parent
d7fca734c8
commit
6631cdb23b
9
app.go
9
app.go
@ -5,6 +5,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@ -45,7 +46,12 @@ func waitKey() error {
|
|||||||
stty $old
|
stty $old
|
||||||
echo`
|
echo`
|
||||||
|
|
||||||
cmd := exec.Command(gOpts.shell, "-c", c)
|
var cmd *exec.Cmd
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
cmd = exec.Command("cmd", "/c", "pause")
|
||||||
|
} else {
|
||||||
|
cmd = exec.Command(gOpts.shell, "-c", c)
|
||||||
|
}
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
cmd.Stdin = os.Stdin
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
@ -135,6 +141,7 @@ func (app *app) runShell(s string, args []string, wait bool, async bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
args = append([]string{"-c", s, "--"}, args...)
|
args = append([]string{"-c", s, "--"}, args...)
|
||||||
|
|
||||||
cmd := exec.Command(gOpts.shell, args...)
|
cmd := exec.Command(gOpts.shell, args...)
|
||||||
|
|
||||||
if !async {
|
if !async {
|
||||||
|
Loading…
Reference in New Issue
Block a user