Skip to content

Commit

Permalink
Don't panic on exec, log instead
Browse files Browse the repository at this point in the history
It'd crash if a command isn't found in PATH for example.
  • Loading branch information
rubiojr authored and muesli committed Dec 18, 2020
1 parent ada894e commit fe7429d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deck.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ func executeCommand(cmd string) {
args := strings.Split(cmd, " ")
c := exec.Command(args[0], args[1:]...)
if err := c.Start(); err != nil {
panic(err)
log.Printf("command failed: %s", err)
return
}
err := c.Wait()
if err != nil {
Expand Down

0 comments on commit fe7429d

Please sign in to comment.