aboutsummaryrefslogtreecommitdiff
path: root/tests/nix-profile.sh
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2023-02-28 10:53:42 +0100
committerBob van der Linden <bobvanderlinden@gmail.com>2023-02-28 10:53:42 +0100
commit0167862e8e3faddeab6fb40a08c05a63865fe96b (patch)
tree198305fec95bbc9e0e25441050a721a728ecf0fe /tests/nix-profile.sh
parent3efa476c5439f8f6c1968a6ba20a31d1239c2f04 (diff)
fixup! tests: nix-profile: test install error message upon conflicting files
Diffstat (limited to 'tests/nix-profile.sh')
-rw-r--r--tests/nix-profile.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/nix-profile.sh b/tests/nix-profile.sh
index d4beaa190..652e8a8f2 100644
--- a/tests/nix-profile.sh
+++ b/tests/nix-profile.sh
@@ -141,7 +141,11 @@ printf World2 > $flake2Dir/who
nix profile install $flake1Dir
[[ $($TEST_HOME/.nix-profile/bin/hello) = "Hello World" ]]
expect 1 nix profile install $flake2Dir
-diff -u <(nix profile install $flake2Dir 2>&1 1> /dev/null || true) <(cat << EOF
+diff -u <(
+ nix --offline profile install $flake2Dir 2>&1 1> /dev/null \
+ | grep -vE "^warning: " \
+ || true
+) <(cat << EOF
error: An existing package already provides the following file:
$(nix build --no-link --print-out-paths ${flake1Dir}"#default.out")/bin/hello