1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 18:01:16 +02:00

Make the repl test more robust

Seen in 4390954027:

  nix-functional-tests> grep: repl_output: No such file or directory
  nix-functional-tests> +(repl.sh:174) cat repl_output

This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.

(cherry picked from commit 9eb46e9cc0)
This commit is contained in:
Eelco Dolstra 2025-06-11 19:14:31 +02:00 committed by Mergify
parent 0bf8d076f5
commit 0f1a5c519e

View file

@ -159,7 +159,8 @@ foo + baz
# - Re-eval it
# - Check that the result has changed
mkfifo repl_fifo
nix repl ./flake --experimental-features 'flakes' < repl_fifo > repl_output 2>&1 &
touch repl_output
nix repl ./flake --experimental-features 'flakes' < repl_fifo >> repl_output 2>&1 &
repl_pid=$!
exec 3>repl_fifo # Open fifo for writing
echo "changingThing" >&3