housekeeping: shellcheck for tests/functional/derivation-json.sh

This commit is contained in:
Cameron Dart 2024-06-04 13:32:33 -07:00 committed by John Ericson
parent 58a653dcc6
commit 847842c4bb

View File

@ -4,11 +4,11 @@ source common.sh
drvPath=$(nix-instantiate simple.nix)
nix derivation show $drvPath | jq .[] > $TEST_HOME/simple.json
nix derivation show "$drvPath" | jq .[] > "$TEST_HOME"/simple.json
drvPath2=$(nix derivation add < $TEST_HOME/simple.json)
drvPath2=$(nix derivation add < "$TEST_HOME"/simple.json)
[[ "$drvPath" = "$drvPath2" ]]
# Input addressed derivations cannot be renamed.
jq '.name = "foo"' < $TEST_HOME/simple.json | expectStderr 1 nix derivation add | grepQuiet "has incorrect output"
jq '.name = "foo"' < "$TEST_HOME"/simple.json | expectStderr 1 nix derivation add | grepQuiet "has incorrect output"