Skip to content
Myr

Restore CmdLine parameter when running commands using cmd.exe

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent f39ae0e · Browse files · 1 file+14 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+14 added−4 removed

  • other:+14 added−4 removed

1 file+14 added−4 removed

modified:src/util/util_windows.go+14 added-4 removed
55 unmodified lines
56 }57 }58 x.shellPath.Store(shell)59 }60 var cmd *exec.Cmd61 if strings.Contains(shell, "cmd") {62 cmd = exec.Command(shell)63 cmd.SysProcAttr = &syscall.SysProcAttr{64 HideWindow: false,65 CmdLine: fmt.Sprintf(`%s "%s"`, strings.Join(x.args, " "), command),66 CreationFlags: 0,67 }68 } else {60 cmd := exec.Command(shell, append(x.args, command)...)61 cmd.SysProcAttr = &syscall.SysProcAttr{62 HideWindow: false,63 CreationFlags: 0,69 cmd = exec.Command(shell, append(x.args, command)...)70 cmd.SysProcAttr = &syscall.SysProcAttr{71 HideWindow: false,72 CreationFlags: 0,73 }74 }75 return cmd76}77
62 unmodified lines