mirror of
https://github.com/NixOS/nix
synced 2025-07-08 19:23:54 +02:00
Properly return false on builtins.pathExists /someNonAllowedPath
Follow-up from https://github.com/NixOS/nix/pull/5807 to fix https://github.com/NixOS/nix/pull/5807#issuecomment-1000135394
This commit is contained in:
parent
7feb741e00
commit
dc89dfa7b3
2 changed files with 25 additions and 7 deletions
|
@ -11,6 +11,9 @@ missingImpureErrorMsg=$(! nix eval --expr 'builtins.readFile ./pure-eval.sh' 2>&
|
|||
echo "$missingImpureErrorMsg" | grep -q -- --impure || \
|
||||
fail "The error message should mention the “--impure” flag to unblock users"
|
||||
|
||||
[[ $(nix eval --expr 'builtins.pathExists ./pure-eval.sh') == false ]] || \
|
||||
fail "Calling 'pathExists' on a non-authorised path should return false"
|
||||
|
||||
(! nix eval --expr builtins.currentTime)
|
||||
(! nix eval --expr builtins.currentSystem)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue