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

Merge branch 'master' into build

This commit is contained in:
Carlos Alexandro Becker 2018-01-28 11:46:19 -02:00
commit 2d54332bee
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -5,6 +5,8 @@ import (
"errors"
"os/exec"
"strings"
"github.com/apex/log"
)
// IsRepo returns true if current folder is a git repository
@ -17,10 +19,12 @@ func IsRepo() bool {
func Run(args ...string) (output string, err error) {
/* #nosec */
var cmd = exec.Command("git", args...)
log.WithField("args", args).Debug("running git")
bts, err := cmd.CombinedOutput()
if err != nil {
return "", errors.New(string(bts))
}
log.WithField("output", string(bts)).Debug("result")
return string(bts), err
}