mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
* Fix for NIX-31: "nix-env -i foo" installing all derivations named
foo. Now it will only install the one with the highest version number.
This commit is contained in:
parent
58fc420b36
commit
7a3e715980
2 changed files with 64 additions and 10 deletions
|
@ -82,7 +82,7 @@ test "$($nixenv -p $profiles/test -q | wc -l)" -eq 0
|
|||
|
||||
# Installing "foo" should only install the newest foo.
|
||||
$nixenv -p $profiles/test -f ./user-envs.nix -i foo
|
||||
test "$($nixenv -p $profiles/test -q | grep foo- | wc)" -eq 1
|
||||
test "$($nixenv -p $profiles/test -q | grep foo- | wc -l)" -eq 1
|
||||
$nixenv -p $profiles/test -q | grep -q foo-2.0
|
||||
|
||||
# On the other hand, this should install both (and should fail due to
|
||||
|
@ -93,6 +93,6 @@ if $nixenv -p $profiles/test -f ./user-envs.nix -i foo-1.0 foo-2.0; then false;
|
|||
# Installing "*" should install one foo and one bar.
|
||||
$nixenv -p $profiles/test -f ./user-envs.nix -e '*'
|
||||
$nixenv -p $profiles/test -f ./user-envs.nix -i '*'
|
||||
test "$($nixenv -p $profiles/test -q | wc)" -eq 2
|
||||
test "$($nixenv -p $profiles/test -q | wc -l)" -eq 2
|
||||
$nixenv -p $profiles/test -q | grep -q foo-2.0
|
||||
$nixenv -p $profiles/test -q | grep -q bar-0.1.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue