diff options
Diffstat (limited to 'releaser')
-rw-r--r-- | releaser/git.go | 5 | ||||
-rw-r--r-- | releaser/releaser.go | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/releaser/git.go b/releaser/git.go index 7d2d43e2a..4db1c2329 100644 --- a/releaser/git.go +++ b/releaser/git.go @@ -15,11 +15,12 @@ package releaser import ( "fmt" - "os/exec" "regexp" "sort" "strconv" "strings" + + "github.com/gohugoio/hugo/common/hexec" ) var issueRe = regexp.MustCompile(`(?i)[Updates?|Closes?|Fix.*|See] #(\d+)`) @@ -148,7 +149,7 @@ func extractIssues(body string) []int { type gitInfos []gitInfo func git(args ...string) (string, error) { - cmd := exec.Command("git", args...) + cmd, _ := hexec.SafeCommand("git", args...) out, err := cmd.CombinedOutput() if err != nil { return "", fmt.Errorf("git failed: %q: %q (%q)", err, out, args) diff --git a/releaser/releaser.go b/releaser/releaser.go index 97ffe1a2c..5c5a34787 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -20,11 +20,12 @@ import ( "io/ioutil" "log" "os" - "os/exec" "path/filepath" "regexp" "strings" + "github.com/gohugoio/hugo/common/hexec" + "github.com/gohugoio/hugo/common/hugo" "github.com/pkg/errors" ) @@ -266,7 +267,7 @@ func (r *ReleaseHandler) release(releaseNotesFile string) error { args = append(args, "--skip-publish") } - cmd := exec.Command("goreleaser", args...) + cmd, _ := hexec.SafeCommand("goreleaser", args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run() |