Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/shellexec/shellexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func StartLocalShellProc(logCtx context.Context, termSize waveobj.TermSize, cmdS
if len(pamEnvs) > 0 {
// We only want to set the XDG variables from the PAM environment, all others should already be correct or may have been overridden by something else out of our control
for k := range pamEnvs {
if _, ok := varsToReplace[k]; ok && len(pamEnvs[k]) > 0 {
if _, ok := varsToReplace[k]; ok {
varsToReplace[k] = pamEnvs[k]
}
}
Expand Down
7 changes: 3 additions & 4 deletions pkg/util/shellutil/shellutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,10 @@ func UpdateCmdEnv(cmd *exec.Cmd, envVars map[string]string) {
envKey := GetEnvStrKey(envStr)
newEnvVal, ok := envVars[envKey]
if ok {
if newEnvVal == "" {
continue
}
newEnv = append(newEnv, envKey+"="+newEnvVal)
found[envKey] = true
if newEnvVal != "" {
newEnv = append(newEnv, envKey+"="+newEnvVal)
}
} else {
newEnv = append(newEnv, envStr)
}
Expand Down
Loading