diff --git a/lib/tests/sources.sh b/lib/tests/sources.sh index e148d023c854..68d21d2aa6d3 100755 --- a/lib/tests/sources.sh +++ b/lib/tests/sources.sh @@ -11,7 +11,7 @@ die() { if test -n "${TEST_LIB:-}"; then NIX_PATH=nixpkgs="$(dirname "$TEST_LIB")" else - NIX_PATH=nixpkgs="$(cd $(dirname ${BASH_SOURCE[0]})/../..; pwd)" + NIX_PATH=nixpkgs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.."; pwd)" fi export NIX_PATH @@ -20,7 +20,7 @@ clean_up() { rm -rf "$work" } trap clean_up EXIT -cd $work +cd "$work" touch {README.md,module.o,foo.bar} @@ -30,7 +30,7 @@ touch {README.md,module.o,foo.bar} dir="$(nix eval --impure --raw --expr '(with import ; "${ cleanSource ./. }")')" -(cd $dir; find) | sort -f | diff -U10 - <(cat <