mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-13 16:44:52 +08:00
update RunCmd
This commit is contained in:
parent
62a09afa8f
commit
cb21d0e9e0
1 changed files with 1 additions and 2 deletions
|
@ -30,6 +30,7 @@ func RunCmd(command string, printerr bool) (string, error) {
|
|||
<-ctx.Done()
|
||||
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
|
||||
}()
|
||||
cmd.Wait()
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil && printerr {
|
||||
log.Println("error running command:", command)
|
||||
|
@ -37,5 +38,3 @@ func RunCmd(command string, printerr bool) (string, error) {
|
|||
}
|
||||
return string(out), err
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue