diff options
author | Victor Engmark <vengmark@linz.govt.nz> | 2021-11-26 09:30:10 +1300 |
---|---|---|
committer | Victor Engmark <vengmark@linz.govt.nz> | 2021-11-26 09:30:10 +1300 |
commit | 6d53055cb742e2b04511382f9cdbf9e41ec41f14 (patch) | |
tree | e74dfe3e9db720da3a802f72e1acf7720dc1e2a9 /lib/tests | |
parent | 4b5c3d9376a829f454d195d0c8053a160f6b4fbe (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')
-rwxr-xr-x | lib/tests/sources.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tests/sources.sh b/lib/tests/sources.sh index 1f63cac5005a..e148d023c854 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() { |