Skip to content

Commit 10b0666

Browse files
committed
Skip empty XDG values in shellexec
1 parent 27c01cf commit 10b0666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)