mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-06 03:13:48 +02:00
fix: show git error on debug
This commit is contained in:
parent
6a06f76c49
commit
9d4be131cf
@ -25,10 +25,13 @@ func Run(args ...string) (string, error) {
|
||||
var stderr bytes.Buffer
|
||||
cmd.Stdout = &stdout
|
||||
cmd.Stderr = &stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
err := cmd.Run()
|
||||
log.WithField("stdout", stdout.String()).
|
||||
WithField("stderr", stderr.String()).
|
||||
Debug("git result")
|
||||
if err != nil {
|
||||
return "", errors.New(stderr.String())
|
||||
}
|
||||
log.WithField("output", stdout.String()).Debug("git result")
|
||||
return stdout.String(), nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user