aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlbodor <lazar.bodor@ga.gov.au>2023-03-12 22:40:47 +1100
committerlbodor <lazar.bodor@ga.gov.au>2023-03-12 22:40:47 +1100
commit526bdbda3cfa396808a12e6598df50dacb04e6dd (patch)
tree046059bc1d4ed1e0aeff7ac17721914fae55ff5e /src
parent208c8551249361d2383b44123b4ad156218c351b (diff)
print-dev-env: stop inadvertently adding . to PATH
Diffstat (limited to 'src')
-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"})