Update cross.go

This commit is contained in:
khjde1207 2017-03-27 11:05:31 +09:00 committed by GitHub
parent ed7170a02f
commit 2293e37e72
1 changed files with 6 additions and 1 deletions

View File

@ -75,7 +75,12 @@ func CrossCompilationHandler(w http.ResponseWriter, r *http.Request) {
suffix = ".exe" suffix = ".exe"
} }
cmd := exec.Command("go", "build") user := conf.GetUser(username)
goBuildArgs := []string{}
goBuildArgs = append(goBuildArgs, "build")
goBuildArgs = append(goBuildArgs, user.GetBuildArgs(goos)...)
cmd := exec.Command("go", goBuildArgs...)
cmd.Dir = curDir cmd.Dir = curDir
setCmdEnv(cmd, username) setCmdEnv(cmd, username)