File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,23 +118,20 @@ nix flake lock $flakeFollowsA
118118jq -r -c ' .nodes | keys | .[]' $flakeFollowsA /flake.lock | grep " ^foobar$"
119119
120120# Check that path: inputs cannot escape from their root.
121- # FIXME: this test is wonky because with lazy trees, ../flakeB at the root is equivalent to /flakeB and not an error.
122121cat > $flakeFollowsA /flake.nix << EOF
123122{
124123 description = "Flake A";
125124 inputs = {
126125 B.url = "path:../flakeB";
127126 };
128- outputs = { ... }: {
129- x = 123;
130- };
127+ outputs = { ... }: {};
131128}
132129EOF
133130
134131git -C $flakeFollowsA add flake.nix
135132
136- expect 1 nix eval $flakeFollowsA #x 2>&1 | grep ' /flakeB.*is forbidden in pure evaluation mode'
137- expect 1 nix eval --impure $flakeFollowsA #x 2>&1 | grep ' /flakeB.*does not exist'
133+ expect 1 nix flake lock $flakeFollowsA 2>&1 | grep ' /flakeB.*is forbidden in pure evaluation mode'
134+ expect 1 nix flake lock --impure $flakeFollowsA 2>&1 | grep ' /flakeB.*does not exist'
138135
139136# Test relative non-flake inputs.
140137cat > $flakeFollowsA /flake.nix << EOF
You can’t perform that action at this time.
0 commit comments