Skip to content

Commit

Permalink
copy environment to git fetch command execution
Browse files Browse the repository at this point in the history
  • Loading branch information
imod committed May 30, 2018
1 parent 1b14178 commit 5c12bf1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ func getLatestTag(c config) (string, error) {
return "", errors.New(fmt.Sprint("error running git: %v", err))
}
cmd := exec.Command("git", "fetch", "--tags", "-v")
cmd.Env = append(cmd.Env, "GIT_ASKPASS="+os.Getenv("GIT_ASKPASS"))
for _, e := range os.Environ() {
cmd.Env = append(cmd.Env, e)
}
err = cmd.Run()
if err != nil {
return "", errors.New(fmt.Sprint("error fetching tags: %v", err))
Expand Down

0 comments on commit 5c12bf1

Please sign in to comment.