Skip to content

Commit 7d1c805

Browse files
authored
Skip empty XDG values in shellexec (#2006)
1 parent 27c01cf commit 7d1c805

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/shellexec/shellexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ func StartLocalShellProc(logCtx context.Context, termSize waveobj.TermSize, cmdS
534534
if len(pamEnvs) > 0 {
535535
// 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
536536
for k := range pamEnvs {
537-
if _, ok := varsToReplace[k]; ok {
537+
if _, ok := varsToReplace[k]; ok && len(pamEnvs[k]) > 0 {
538538
varsToReplace[k] = pamEnvs[k]
539539
}
540540
}

0 commit comments

Comments
 (0)