Skip to content

Commit 0cf31ba

Browse files
committed
Run notify command in shell
Allows pipes and multiple actions to be run without needing to bundle them into a separate script.
1 parent db58d1f commit 0cf31ba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docker-gen.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ func runNotifyCmd(config Config) {
145145
}
146146

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

0 commit comments

Comments
 (0)