29 lines
457 B
Go
29 lines
457 B
Go
|
// +build windows
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
// Standard
|
||
|
"os"
|
||
|
"os/exec"
|
||
|
)
|
||
|
|
||
|
func run(cmd *CommandSet) error {
|
||
|
screen.Fini()
|
||
|
if lastExecutableCommand.Inplace {
|
||
|
c := exec.Command("cmd", "/C", cmd.Exec)
|
||
|
c.Stdin = os.Stdin
|
||
|
c.Stdout = os.Stdout
|
||
|
c.Stderr = os.Stderr
|
||
|
if err := c.Run(); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
} else {
|
||
|
c := exec.Command("cmd", "/C", "start /b "+cmd.Exec)
|
||
|
if err := c.Run(); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|