Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): global upgrade supports matchspec #962

Merged

Conversation

chawyehsu
Copy link
Contributor

A small logic tweak making global upgrade <package> support matchspec input.

before:

$ pixi g upgrade python==3.10
  × Package is not globally installed

after:

$ .\target\release\pixi.exe g upgrade python==3.11
  Updated python v3.10.0 -> v3.11.0

This is useful when they don't want to upgrade a package to the latest version but a slightly newer one.

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@ruben-arts
Copy link
Contributor

This now doesn't allow to downgrade, what do you think of skipping the version check if the version is specified in the package argument?

example:

pixi on  feature/global-upgrade-matchspec is 📦 v0.16.1 via 🦀 v1.75.0 took 49s 
➜ pixi g upgrade uv==0.1.17
  Updated uv v0.1.16 -> v0.1.17                                                                 

pixi on  feature/global-upgrade-matchspec is 📦 v0.16.1 via 🦀 v1.75.0 took 9s 
➜ pixi g upgrade uv==0.1.16
Package uv is already up-to-date

Would be cool if that was also possible.

@chawyehsu
Copy link
Contributor Author

Yeah that will be more semantic for matchspec support.

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm! Thanks @chawyehsu

@ruben-arts ruben-arts enabled auto-merge (squash) March 12, 2024 13:21
@ruben-arts ruben-arts disabled auto-merge March 12, 2024 15:28
@ruben-arts ruben-arts merged commit bd79aee into prefix-dev:main Mar 12, 2024
14 checks passed
@chawyehsu chawyehsu deleted the feature/global-upgrade-matchspec branch October 11, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants