Skip to content

Commit

Permalink
Merge pull request #9 from imod/copy-environment-to-git-fetch-command…
Browse files Browse the repository at this point in the history
…-execution

copy environment to git fetch command execution
  • Loading branch information
rawlingsj authored May 30, 2018
2 parents 1b14178 + 5c12bf1 commit 0515244
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 0515244

Please sign in to comment.