Closed frioux closed 5 years ago
That was just an accident; feel free to remove those lines or I will when I have a chance (probably Tuesday.)
On Sat, Mar 30, 2019 at 12:30:41AM -0700, Quentin Renard wrote:
asticode requested changes on this pull request.
@@ -375,17 +375,18 @@ func (b *Bundler) bundle(e ConfigurationEnvironment) (err error) { astilog.Debugf("Building for os %s and arch %s", e.OS, e.Arch) var binaryPath = filepath.Join(environmentPath, "binary") var cmd = exec.Command(b.pathGoBinary, "build", "-ldflags", b.ldflags.String(), "-o", binaryPath, b.pathBuild)
- cmd.Env = []string{
- "GOARCH=" + e.Arch,
- "GOOS=" + e.OS,
- "GOCACHE=" + os.Getenv("GOCACHE"),
- "GOFLAGS=" + os.Getenv("GOFLAGS"),
- "GOPATH=" + gp,
- "GOROOT=" + os.Getenv("GOROOT"),
- "PATH=" + os.Getenv("PATH"),
- "TEMP=" + os.Getenv("TEMP"),
- "TAGS=" + os.Getenv("TAGS"),
- }
- cmd.Env = os.Environ()
- cmd.Env = append(cmd.Env,
Is there a reason why you still append
GOCACHE
,GOFLAGS
,GOROOT
,PATH
,TEMP
andTAGS
?From my understanding,
os.Environ()
is already taking care of that, isn't it?-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/asticode/go-astilectron-bundler/pull/49#pullrequestreview-220811494
-- fREW Schmidt https://blog.afoolishmanifesto.com
I'll merge the PR and remove them myself. Cheers
thanks!
Should fix builds on Go 1.12 and also reduce build time for older versions of Go thanks to allowing use of the build cache.
Fixes #48