Skip to content

Commit a807f94

Browse files
authored
Fixed: Return the error when a command fails to start (#855)
1 parent 10b895d commit a807f94

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: util/command.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ func (c *Command) Run() error {
3636

3737
if err := c.Cmd.Start(); err != nil {
3838
c.Err = err
39-
//log.Fatalf("Cmd.Start: %v")
39+
return c.Err
4040
}
4141

4242
if err := c.Cmd.Wait(); err != nil {
4343
c.Err = err
4444
if exiterr, ok := err.(*exec.ExitError); ok {
4545
if status, ok := exiterr.Sys().(syscall.WaitStatus); ok {
4646
c.Status = status.ExitStatus()
47-
//log.Printf("Exit Status: %d", status.ExitStatus())
4847
}
4948
}
5049
} else {

0 commit comments

Comments
 (0)