1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

profile: add --all option to match any package

This commit is contained in:
Bob van der Linden 2024-03-06 22:04:53 +01:00
parent fb391ebc77
commit 7a4d5e89d3
No known key found for this signature in database
4 changed files with 38 additions and 2 deletions

View file

@ -77,6 +77,13 @@ nix profile upgrade --regex '.*'
[[ $(readlink $TEST_HOME/.nix-profile/bin/hello) =~ .*-profile-test-2\.1/bin/hello ]]
nix profile rollback
# Test upgrading all packages
printf 2.2 > $flake1Dir/version
nix profile upgrade --all
[[ $(readlink $TEST_HOME/.nix-profile/bin/hello) =~ .*-profile-test-2\.2/bin/hello ]]
nix profile rollback
printf 1.0 > $flake1Dir/version
# Test matching no packages using literal package name.
assertStderr nix --offline profile upgrade this_package_is_not_installed << EOF
warning: Package name 'this_package_is_not_installed' does not match any packages in the profile.