提交 b59ac8ac 编写于 作者: Z zhaoke

* Fix fetch options error.

上级 bbae0816
...@@ -76,3 +76,5 @@ test/cli/docker/ ...@@ -76,3 +76,5 @@ test/cli/docker/
cmd/test/restapi/allure-results/ cmd/test/restapi/allure-results/
cmd/test/restapi/result.json cmd/test/restapi/result.json
cmd/test/restapi/result.zip cmd/test/restapi/result.zip
cmd/test/result.json
cmd/test/result.zip
...@@ -150,6 +150,7 @@ func printStdout(stdout io.ReadCloser, ch chan int, cmd *exec.Cmd, key string, w ...@@ -150,6 +150,7 @@ func printStdout(stdout io.ReadCloser, ch chan int, cmd *exec.Cmd, key string, w
for { for {
line, err3 := reader1.ReadString('\n') line, err3 := reader1.ReadString('\n')
if line != "" { if line != "" {
line = stringUtils.Convert2Utf8IfNeeded(line)
websocketHelper.SendOutputMsgIfNeed(line, "", iris.Map{"key": key}, wsMsg) websocketHelper.SendOutputMsgIfNeed(line, "", iris.Map{"key": key}, wsMsg)
logUtils.ExecConsole(1, line) logUtils.ExecConsole(1, line)
logUtils.ExecFile(line) logUtils.ExecFile(line)
...@@ -189,6 +190,7 @@ func printStderr(isTerminal bool, stderr io.ReadCloser, key string, wsMsg *webso ...@@ -189,6 +190,7 @@ func printStderr(isTerminal bool, stderr io.ReadCloser, key string, wsMsg *webso
if err2 != nil || io.EOF == err2 { if err2 != nil || io.EOF == err2 {
break break
} }
line = stringUtils.Convert2Utf8IfNeeded(line)
errOutputArr = append(errOutputArr, line) errOutputArr = append(errOutputArr, line)
} }
} }
......
...@@ -244,12 +244,7 @@ func GetBugFiledOptions(config commDomain.WorkspaceConf, productId int) ( ...@@ -244,12 +244,7 @@ func GetBugFiledOptions(config commDomain.WorkspaceConf, productId int) (
return return
} }
jsn, err := simplejson.NewJson(bytes) bytes = []byte(strings.Replace(string(bytes), `"modules":["\/"]`, `"modules":{"0":"\/"}`, 1))
if err != nil {
err = ZentaoRequestErr(url, commConsts.ResponseParseErr.Message)
return
}
fmt.Println(jsn)
err = json.Unmarshal(bytes, &bugOptionsWrapper) err = json.Unmarshal(bytes, &bugOptionsWrapper)
if err != nil { if err != nil {
err = ZentaoRequestErr(url, commConsts.ResponseParseErr.Message) err = ZentaoRequestErr(url, commConsts.ResponseParseErr.Message)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册