nix-super/tests/functional/flakes/eval-cache.sh
John Ericson 1e99f324d9 Fix shellcheck issue
8b86f415c1 was merged from a CI run that
predated the new linting.
2024-06-03 09:36:48 -04:00

24 lines
470 B
Bash
Executable file

#!/usr/bin/env bash
source ./common.sh
requireGit
flake1Dir="$TEST_ROOT/eval-cache-flake"
createGitRepo "$flake1Dir" ""
cat >"$flake1Dir/flake.nix" <<EOF
{
description = "Fnord";
outputs = { self }: {
foo.bar = throw "breaks";
};
}
EOF
git -C "$flake1Dir" add flake.nix
git -C "$flake1Dir" commit -m "Init"
expect 1 nix build "$flake1Dir#foo.bar" 2>&1 | grepQuiet 'error: breaks'
expect 1 nix build "$flake1Dir#foo.bar" 2>&1 | grepQuiet 'error: breaks'