mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
housekeeping: shellcheck for tests/functional/flakes/search-root.sh
This commit is contained in:
parent
b9768b4872
commit
e1ce349d05
1 changed files with 5 additions and 5 deletions
|
@ -4,8 +4,8 @@ source common.sh
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
|
|
||||||
writeSimpleFlake $TEST_HOME
|
writeSimpleFlake "$TEST_HOME"
|
||||||
cd $TEST_HOME
|
cd "$TEST_HOME"
|
||||||
mkdir -p foo/subdir
|
mkdir -p foo/subdir
|
||||||
|
|
||||||
echo '{ outputs = _: {}; }' > foo/flake.nix
|
echo '{ outputs = _: {}; }' > foo/flake.nix
|
||||||
|
@ -27,11 +27,11 @@ success=("" . .# .#test ../subdir ../subdir#test "$PWD")
|
||||||
failure=("path:$PWD" "../simple.nix")
|
failure=("path:$PWD" "../simple.nix")
|
||||||
|
|
||||||
for i in "${success[@]}"; do
|
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
|
done
|
||||||
|
|
||||||
for i in "${failure[@]}"; do
|
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
|
done
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -45,7 +45,7 @@ if [[ -n $(type -p git) ]]; then
|
||||||
pushd subdir
|
pushd subdir
|
||||||
git init
|
git init
|
||||||
for i in "${success[@]}" "${failure[@]}"; do
|
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
|
done
|
||||||
rm -rf .git
|
rm -rf .git
|
||||||
popd
|
popd
|
||||||
|
|
Loading…
Reference in a new issue