1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 23:03:53 -04:00

flakes: test to ensure we get an error if --file isn't used

This commit is contained in:
detroyejr 2024-03-22 21:56:19 -04:00
parent c625b45357
commit b11dd58fe4

View file

@ -47,6 +47,9 @@ testRepl () {
| grep "attribute 'currentSystem' missing" | grep "attribute 'currentSystem' missing"
nix repl "${nixArgs[@]}" 2>&1 <<< "builtins.currentSystem" \ nix repl "${nixArgs[@]}" 2>&1 <<< "builtins.currentSystem" \
| grep "$(nix-instantiate --eval -E 'builtins.currentSystem')" | grep "$(nix-instantiate --eval -E 'builtins.currentSystem')"
expectStderr 1 nix repl ${testDir}/simple.nix \
| grepQuiet -s "error: path '$testDir/simple.nix' is not a flake"
} }
# Simple test, try building a drv # Simple test, try building a drv