From b11dd58fe4bd75b25a0f458888dd0ceb8d7d62e1 Mon Sep 17 00:00:00 2001 From: detroyejr Date: Fri, 22 Mar 2024 21:56:19 -0400 Subject: [PATCH] flakes: test to ensure we get an error if --file isn't used --- tests/functional/repl.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/repl.sh b/tests/functional/repl.sh index 4938c2267..f11fa7140 100644 --- a/tests/functional/repl.sh +++ b/tests/functional/repl.sh @@ -47,6 +47,9 @@ testRepl () { | grep "attribute 'currentSystem' missing" nix repl "${nixArgs[@]}" 2>&1 <<< "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