From ed7170a02f57783f53b37f946ac8ae3cb6f0ee89 Mon Sep 17 00:00:00 2001 From: khjde1207 Date: Mon, 27 Mar 2017 11:04:34 +0900 Subject: [PATCH] Update build.go --- output/build.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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"