nix-super/tests/functional/flakes/eval-cache.sh

25 lines
470 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2024-05-24 17:16:38 +03:00
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'