Proper redirections of the subprocess channels with real-time output

This commit is contained in:
roli 2020-02-18 14:29:40 +01:00
parent 529326ba41
commit b1c96920b2

View File

@ -53,7 +53,7 @@ func (p Plugin) Exec() error {
cmd := exec.Command("sonar-scanner", args...) cmd := exec.Command("sonar-scanner", args...)
// fmt.Printf("==> Executing: %s\n", strings.Join(cmd.Args, " ")) // fmt.Printf("==> Executing: %s\n", strings.Join(cmd.Args, " "))
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout
cmd.Stderr = os.Stdout cmd.Stderr = os.Stderr
fmt.Printf("==> Code Analysis Result:\n") fmt.Printf("==> Code Analysis Result:\n")
err := cmd.Run() err := cmd.Run()
if err != nil { if err != nil {