aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2023-03-13 19:52:41 +0100
committerGitHub <noreply@github.com>2023-03-13 19:52:41 +0100
commita387f46967ae9eb97eaeb17ca26fb583283815ce (patch)
treea1aff367379e96b6eea7eb0a86fb26d43a6de0a3 /src
parent4a96125c3cbcb91eebb6ebda044841f3fab3bf21 (diff)
parenta3a6909bc8e33cf1bf102a315f398a252607b5e0 (diff)
Merge pull request #8033 from lbodor/stop-adding-dot-to-nix-dev-env-path
`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"})