Skip to content

Commit

Permalink
remove issue of double output on error
Browse files Browse the repository at this point in the history
  • Loading branch information
clubanderson committed Apr 12, 2024
1 parent 8b3054b commit 1d2ed29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pkg/src/labeler-helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,11 @@ func (p ParamsStruct) runCmd(cmdToRun string, cmdArgs []string) ([]byte, error)
return nil, err
}

err = cmd.Wait()
if err != nil {
// log.Println("labeler.go: error waiting for command to complete:", err)
log.Printf(string(outputBuf.Bytes()))
return nil, err
}
// err = cmd.Wait()
// if err != nil {
// // log.Println("labeler.go: error waiting for command to complete:", err)
// log.Printf(string(outputBuf.Bytes()))
// return nil, err
// }
return outputBuf.Bytes(), nil
}
2 changes: 1 addition & 1 deletion pkg/src/labeler.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (p ParamsStruct) aliasRun(args []string) error {
log.Println(err)
os.Exit(1)
} else {
fmt.Printf("%v", string(out))
fmt.Printf("%v", string(output))
}

// now run helm as template and label the output
Expand Down

0 comments on commit 1d2ed29

Please sign in to comment.