mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Merge pull request #9930 from rvl/print-dev-env-unbound-variables
print-dev-env: Avoid using unbound shellHook variable
This commit is contained in:
commit
25385a408e
2 changed files with 3 additions and 3 deletions
|
@ -354,7 +354,7 @@ struct Common : InstallableCommand, MixProfile
|
|||
for (auto & i : {"TMP", "TMPDIR", "TEMP", "TEMPDIR"})
|
||||
out << fmt("export %s=\"$NIX_BUILD_TOP\"\n", i);
|
||||
|
||||
out << "eval \"$shellHook\"\n";
|
||||
out << "eval \"${shellHook:-}\"\n";
|
||||
|
||||
auto script = out.str();
|
||||
|
||||
|
|
|
@ -118,10 +118,10 @@ diff $TEST_ROOT/dev-env{,2}.json
|
|||
# Ensure `nix print-dev-env --json` contains variable assignments.
|
||||
[[ $(jq -r .variables.arr1.value[2] $TEST_ROOT/dev-env.json) = '3 4' ]]
|
||||
|
||||
# Run tests involving `source <(nix print-dev-inv)` in subshells to avoid modifying the current
|
||||
# Run tests involving `source <(nix print-dev-env)` in subshells to avoid modifying the current
|
||||
# environment.
|
||||
|
||||
set +u # FIXME: Make print-dev-env `set -u` compliant (issue #7951)
|
||||
set -u
|
||||
|
||||
# Ensure `source <(nix print-dev-env)` modifies the environment.
|
||||
(
|
||||
|
|
Loading…
Reference in a new issue