aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-09-02 14:01:07 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-09-02 14:18:04 +0200
commitb2e8120d25de5303bfb6a99c14d3ecad21f55a05 (patch)
treec38118e4d29c071df4c80e7593566de7e9537620 /tests
parentb2f966f4871cf02c2505afe88a296e429859a7b3 (diff)
parseInstallables(): Parse store paths as store paths
If the store path contains a flake, this means that a command like "nix path-info /path" will show info about /path, not about the default output of the flake in /path. If you want the latter, you can explicitly ask for it by doing "nix path-info path:/path". Fixes #4568.
Diffstat (limited to 'tests')
-rw-r--r--tests/flakes.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh
index 29f0fe05e..610bab391 100644
--- a/tests/flakes.sh
+++ b/tests/flakes.sh
@@ -775,6 +775,10 @@ git -C $flakeFollowsA add flake.nix
nix flake lock $flakeFollowsA 2>&1 | grep 'this is a security violation'
# Test flake in store does not evaluate
+rm -rf $badFlakeDir
mkdir $badFlakeDir
echo INVALID > $badFlakeDir/flake.nix
nix store delete $(nix store add-path $badFlakeDir)
+
+[[ $(nix path-info $(nix store add-path $flake1Dir)) =~ flake1 ]]
+[[ $(nix path-info path:$(nix store add-path $flake1Dir)) =~ simple ]]