diff --git a/output/build.go b/output/build.go index 05a5cc8..b2c21df 100644 --- a/output/build.go +++ b/output/build.go @@ -17,6 +17,7 @@ package output import ( "bufio" "encoding/json" + "fmt" "io" "net/http" "os" @@ -94,7 +95,7 @@ func BuildHandler(w http.ResponseWriter, r *http.Request) { goBuildArgs := []string{} goBuildArgs = append(goBuildArgs, "build") - goBuildArgs = append(goBuildArgs, strings.Split(user.GoBuildArgs, " ")...) + goBuildArgs = append(goBuildArgs, user.GetBuildArgs(runtime.GOOS)...) cmd := exec.Command("go", goBuildArgs...) cmd.Dir = curDir @@ -130,7 +131,7 @@ func BuildHandler(w http.ResponseWriter, r *http.Request) { // display "START [go build]" in front-end browser msg := i18n.Get(locale, "start-build").(string) - msg = strings.Replace(msg, "build]", "build "+user.GoBuildArgs+"]", 1) + msg = strings.Replace(msg, "build]", "build "+fmt.Sprint(user.GetBuildArgs(runtime.GOOS))+"]", 1) channelRet["output"] = "" + msg + "\n" channelRet["cmd"] = "start-build"