+8
-1
@@ -82,6 +82,13 @@ func saveMode(mode string) {
|
||||
_ = config.SaveState(state)
|
||||
}
|
||||
|
||||
func shellArgs(login bool) []string {
|
||||
if login {
|
||||
return []string{"--login"}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
oldState *term.State
|
||||
oldStateFd int
|
||||
@@ -141,7 +148,7 @@ func runWrapper() {
|
||||
adapter := shell.Current
|
||||
|
||||
ctx := context.Background()
|
||||
c := exec.CommandContext(ctx, adapter.GetShellPath())
|
||||
c := exec.CommandContext(ctx, adapter.GetShellPath(), shellArgs(config.Get().Core.ShellLogin)...)
|
||||
c.ExtraFiles = make([]*os.File, 11)
|
||||
// pass write end of pipe to shell as fd 13 (since index 10 maps to 13)
|
||||
c.ExtraFiles[10] = w
|
||||
|
||||
Reference in New Issue
Block a user