diff --git a/execute.go b/execute.go index 08a78b2..3f231aa 100644 --- a/execute.go +++ b/execute.go @@ -64,7 +64,7 @@ func Execute(workDir string, command string, param []string) *define.Result { cmdInstance := exec.Command(command, param...) cmdInstance.Dir = result.WorkDir result.Output, result.Error = cmdInstance.CombinedOutput() - result.Output = []byte(strings.Replace(string(result.Output), "\n", "", -1)) + result.Output = []byte(strings.TrimSpace(string(result.Output))) return result }