1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/internal/git/git.go
Carlos Alexandro Becker d7efa64075
removed duplicated code
2017-08-19 12:47:04 -03:00

18 lines
377 B
Go

// Package git provides an integration with the git command
package git
import (
"errors"
"os/exec"
)
// Run runs a git command and returns its output or errors
func Run(args ...string) (output string, err error) {
var cmd = exec.Command("git", args...)
bts, err := cmd.CombinedOutput()
if err != nil {
return "", errors.New(string(bts))
}
return string(bts), err
}