1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-12 16:52:29 +08:00

fix: fix exec windows command test failed

This commit is contained in:
dudaodong
2022-01-23 14:40:59 +08:00
parent 6f035f710e
commit e07d54d1da
2 changed files with 6 additions and 1 deletions

View File

@@ -56,6 +56,9 @@ func ExecCommand(command string) (stdout, stderr string, err error) {
var errout bytes.Buffer
cmd := exec.Command("/bin/bash", "-c", command)
if IsWindows() {
cmd = exec.Command("cmd")
}
cmd.Stdout = &out
cmd.Stderr = &errout
err = cmd.Run()