aboutsummaryrefslogtreecommitdiff
path: root/src/nix/develop.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 08:51:49 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 08:51:49 +0100
commit9ef32cf3b8e645c9ed1e08b097d07db688cfb0a7 (patch)
tree13d3c652efe7f3d05af6e491f26bf037474f42c6 /src/nix/develop.cc
parent625df32afca54cbc20c1dfe01159fc2b5e549aed (diff)
Merge pull request #9930 from rvl/print-dev-env-unbound-variables
print-dev-env: Avoid using unbound shellHook variable (cherry picked from commit 25385a408ef7281d966c8732608833e224b32586) Change-Id: Id1aca13942adfa628f7bdcfc0b6fc03bb3bab9ea
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r--src/nix/develop.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index 07672a80a..2790ff154 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -318,7 +318,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();