Skip to content

Commit

Permalink
Run notify command in shell
Browse files Browse the repository at this point in the history
Allows pipes and multiple actions to be run without needing to
bundle them into a separate script.
  • Loading branch information
jwilder committed Oct 1, 2014
1 parent db58d1f commit 0cf31ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docker-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ func runNotifyCmd(config Config) {
}

log.Printf("Running '%s'", config.NotifyCmd)
args := strings.Split(config.NotifyCmd, " ")
cmd := exec.Command(args[0], args[1:]...)
cmd := exec.Command("/bin/sh", "-c", config.NotifyCmd)
out, err := cmd.CombinedOutput()
if err != nil {
log.Printf("error running notify command: %s, %s\n", config.NotifyCmd, err)
Expand Down

0 comments on commit 0cf31ba

Please sign in to comment.