print script output if executed
This commit is contained in:
parent
538e2f69de
commit
c243b76969
9
main.go
9
main.go
@ -198,9 +198,8 @@ func getOrDownload(results *wallhaven.SearchResults, r *rand.Rand, downloadPath
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runScript(imgPath, script string) error {
|
func runScript(imgPath, script string) error {
|
||||||
_, err := exec.Command(script, imgPath).Output()
|
cmd := exec.Command(script, imgPath)
|
||||||
if err != nil {
|
cmd.Stdout = os.Stdout
|
||||||
return err
|
cmd.Stderr = os.Stderr
|
||||||
}
|
return cmd.Run()
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user