Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Set environment for git exec.Command()
Browse files Browse the repository at this point in the history
  • Loading branch information
chromicant committed Jul 10, 2018
1 parent 2db35af commit 170ea34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion project/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ func (g gitProject) Download() error {
"-b", g.Version,
g.URL,
g.folder)
cmd.Env = append(cmd.Env, "GIT_TERMINAL_PROMPT=0")
cmd.Env = append(os.Environ(), "GIT_TERMINAL_PROMPT=0")

if bts, err := cmd.CombinedOutput(); err != nil {
log.Println("git clone failed for", g.URL, string(bts))
return err
Expand Down

3 comments on commit 170ea34

@schrej
Copy link

@schrej schrej commented on 170ea34 Jul 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did that myself to fix proxy issues I had yesterday and wanted to PR it. GitHub told me I can't merge automatically. Looked why: fixed 13 hrs ago, 💩.
Thanks anyways though!

@caarlos0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool ahaha

@lroellin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see, maybe this fixes my #219. This issue is about the cache directory disappearing, which may still happen but I don't know why, but maybe the proxy now always works.

Please sign in to comment.