1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

housekeeping: shellcheck for tests/functional/flakes/search-root.sh

This commit is contained in:
Cameron Dart 2024-06-04 13:33:30 -07:00 committed by John Ericson
parent b9768b4872
commit e1ce349d05

View file

@ -4,8 +4,8 @@ source common.sh
clearStore
writeSimpleFlake $TEST_HOME
cd $TEST_HOME
writeSimpleFlake "$TEST_HOME"
cd "$TEST_HOME"
mkdir -p foo/subdir
echo '{ outputs = _: {}; }' > foo/flake.nix
@ -27,11 +27,11 @@ success=("" . .# .#test ../subdir ../subdir#test "$PWD")
failure=("path:$PWD" "../simple.nix")
for i in "${success[@]}"; do
nix build $i || fail "flake should be found by searching up directories"
nix build "$i" || fail "flake should be found by searching up directories"
done
for i in "${failure[@]}"; do
! nix build $i || fail "flake should not search up directories when using 'path:'"
! nix build "$i" || fail "flake should not search up directories when using 'path:'"
done
popd
@ -45,7 +45,7 @@ if [[ -n $(type -p git) ]]; then
pushd subdir
git init
for i in "${success[@]}" "${failure[@]}"; do
! nix build $i || fail "flake should not search past a git repository"
! nix build "$i" || fail "flake should not search past a git repository"
done
rm -rf .git
popd