1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00

fix: always print before hooks output when in debug

This commit is contained in:
Carlos Alexandro Becker 2018-04-10 14:35:45 -03:00
parent eec13796a4
commit d701179975
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -25,8 +25,9 @@ func (Pipe) Run(ctx *context.Context) error {
args := strings.Fields(step)
log.Infof("running %s", color.CyanString(step))
cmd := exec.Command(args[0], args[1:]...)
if out, err := cmd.CombinedOutput(); err != nil {
log.Debug(string(out))
out, err := cmd.CombinedOutput()
log.Debug(string(out))
if err != nil {
return fmt.Errorf("hook failed: %s\n%v", step, string(out))
}
}