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:
commit
2d54332bee
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user