Skip to content

Commit b6299e0

Browse files
authored
[CLI] Removed DISPLAY & USER to leak to pure shell (#1149)
## Summary TSIA ## How was it tested? - compile - `./devbox shell --pure` - `echo $USER` - `echo $DISPLAY`
1 parent 899b283 commit b6299e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/impl/devbox.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,10 +1193,9 @@ func (d *Devbox) convertEnvToMap(currentEnv []string) (map[string]string, error)
11931193
continue
11941194
}
11951195
// handling special cases to for pure shell
1196-
// Passing HOME USER and DISPLAY for pure shell to leak through
1197-
// otherwise devbox binary won't work - this matches nix
1198-
// We include PATH to find the nix installation. It is cleaned for pure mode below
1199-
if !d.pure || key == "HOME" || key == "USER" || key == "DISPLAY" || key == "PATH" {
1196+
// Passing HOME for pure shell to leak through otherwise devbox binary won't work
1197+
// We also include PATH to find the nix installation. It is cleaned for pure mode below
1198+
if !d.pure || key == "HOME" || key == "PATH" {
12001199
env[key] = val
12011200
}
12021201
}

0 commit comments

Comments
 (0)