aboutsummaryrefslogtreecommitdiff
path: root/src/nix/develop.cc
diff options
context:
space:
mode:
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 9d07a7a85..0ee533e85 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -313,7 +313,7 @@ struct Common : InstallableCommand, MixProfile
buildEnvironment.toBash(out, ignoreVars);
for (auto & var : savedVars)
- out << fmt("%s=\"$%s:$nix_saved_%s\"\n", var, var, var);
+ out << fmt("%s=\"$%s${nix_saved_%s:+:$nix_saved_%s}\"\n", var, var, var, var);
out << "export NIX_BUILD_TOP=\"$(mktemp -d -t nix-shell.XXXXXX)\"\n";
for (auto & i : {"TMP", "TMPDIR", "TEMP", "TEMPDIR"})