aboutsummaryrefslogtreecommitdiff
path: root/src/nix/develop.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-07-09 01:02:47 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-07-09 01:18:44 +0200
commit5f6375a816803d17c8ec0f7c2ef960c848be6166 (patch)
treeb601d8b7a7d6e318336f2b34308b5dd8bade1974 /src/nix/develop.cc
parentb1f1347ade81d1f04f2d490baceefb3c4de0b4e3 (diff)
nix develop: Filter some bash magic variables
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r--src/nix/develop.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index e00f0d575..9b2945ba3 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -72,7 +72,7 @@ struct BuildEnvironment
void toBash(std::ostream & out, const std::set<std::string> & ignoreVars) const
{
for (auto & [name, value] : vars) {
- if (!ignoreVars.count(name) && !hasPrefix(name, "BASH_")) {
+ if (!ignoreVars.count(name)) {
if (auto str = std::get_if<String>(&value)) {
out << fmt("%s=%s\n", name, shellEscape(str->value));
if (str->exported)
@@ -191,17 +191,13 @@ struct Common : InstallableCommand, MixProfile
{
std::set<std::string> ignoreVars{
"BASHOPTS",
- "EUID",
"HOME", // FIXME: don't ignore in pure mode?
- "HOSTNAME",
"NIX_BUILD_TOP",
"NIX_ENFORCE_PURITY",
"NIX_LOG_FD",
"NIX_REMOTE",
"PPID",
- "PWD",
"SHELLOPTS",
- "SHLVL",
"SSL_CERT_FILE", // FIXME: only want to ignore /no-cert-file.crt
"TEMP",
"TEMPDIR",