Fix shellopts bug

This commit is contained in:
Joe Lim committed 2023-06-18 15:21:19 +10:00
1 parent 3da2477937
commit a89dd4448c
1 file changed
+2 -1
+2 -1
View File
@@ -106,7 +106,8 @@ func shellCommand(s string, args []string) *exec.Cmd {
for _, arg := range args {
fmt.Fprintf(&builder, ` "%s"`, arg)
}
cmdline := fmt.Sprintf(`%s %s %s "%s"`, gOpts.shell, gOpts.shellopts, gOpts.shellflag, builder.String())
shellOpts := strings.Join(gOpts.shellopts, " ")
cmdline := fmt.Sprintf(`%s %s %s "%s"`, gOpts.shell, shellOpts, gOpts.shellflag, builder.String())
cmd := exec.Command(gOpts.shell)
cmd.SysProcAttr = &windows.SysProcAttr{CmdLine: cmdline}