mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Apply makeNotAllowedError to empty repos
This commit is contained in:
parent
70dcd738ef
commit
67e957b636
6 changed files with 45 additions and 12 deletions
|
@ -29,7 +29,8 @@ suites += {
|
|||
'non-flake-inputs.sh',
|
||||
'relative-paths.sh',
|
||||
'symlink-paths.sh',
|
||||
'debugger.sh'
|
||||
'debugger.sh',
|
||||
'source-paths.sh',
|
||||
],
|
||||
'workdir': meson.current_source_dir(),
|
||||
}
|
||||
|
|
23
tests/functional/flakes/source-paths.sh
Normal file
23
tests/functional/flakes/source-paths.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source ./common.sh
|
||||
|
||||
requireGit
|
||||
|
||||
repo=$TEST_ROOT/repo
|
||||
|
||||
createGitRepo "$repo"
|
||||
|
||||
cat > "$repo/flake.nix" <<EOF
|
||||
{
|
||||
outputs = { ... }: {
|
||||
x = 1;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
expectStderr 1 nix eval "$repo#x" | grepQuiet "error: Path 'flake.nix' in the repository \"$repo\" is not tracked by Git."
|
||||
|
||||
git -C "$repo" add flake.nix
|
||||
|
||||
[[ $(nix eval "$repo#x") = 1 ]]
|
Loading…
Add table
Add a link
Reference in a new issue