lib/tests: Avoid assigning an array to a string

As per <https://github.com/koalaman/shellcheck/wiki/SC2124>.
This commit is contained in:
Victor Engmark 2021-11-26 10:01:24 +13:00
parent 04223a0d43
commit 40ae711f73

View File

@ -14,14 +14,14 @@ fail=0
evalConfig() {
local attr=$1
shift
local script="import ./default.nix { modules = [ $@ ];}"
local script="import ./default.nix { modules = [ $* ];}"
nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace --read-write-mode
}
reportFailure() {
local attr=$1
shift
local script="import ./default.nix { modules = [ $@ ];}"
local script="import ./default.nix { modules = [ $* ];}"
echo 2>&1 "$ nix-instantiate -E '$script' -A '$attr' --eval-only"
evalConfig "$attr" "$@"
fail=$((fail + 1))