about summary refs log tree commit diff
path: root/lib/tests/sources.sh
diff options
context:
space:
mode:
authorVictor Engmark <vengmark@linz.govt.nz>2021-11-26 09:30:10 +1300
committerVictor Engmark <vengmark@linz.govt.nz>2021-11-26 09:30:10 +1300
commit6d53055cb742e2b04511382f9cdbf9e41ec41f14 (patch)
treee74dfe3e9db720da3a802f72e1acf7720dc1e2a9 /lib/tests/sources.sh
parent4b5c3d9376a829f454d195d0c8053a160f6b4fbe (diff)
lib/tests: `export` separately from assignment
Avoids hiding the exit code from the assignment. See
<https://github.com/koalaman/shellcheck/wiki/SC2155>.
Diffstat (limited to 'lib/tests/sources.sh')
-rwxr-xr-xlib/tests/sources.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tests/sources.sh b/lib/tests/sources.sh
index 1f63cac5005af..e148d023c8546 100755
--- a/lib/tests/sources.sh
+++ b/lib/tests/sources.sh
@@ -9,10 +9,11 @@ die() {
 }
 
 if test -n "${TEST_LIB:-}"; then
-  export NIX_PATH=nixpkgs="$(dirname "$TEST_LIB")"
+  NIX_PATH=nixpkgs="$(dirname "$TEST_LIB")"
 else
-  export NIX_PATH=nixpkgs="$(cd $(dirname ${BASH_SOURCE[0]})/../..; pwd)"
+  NIX_PATH=nixpkgs="$(cd $(dirname ${BASH_SOURCE[0]})/../..; pwd)"
 fi
+export NIX_PATH
 
 work="$(mktemp -d)"
 clean_up() {