Skip to content

Commit

Permalink
Update go/tools/builders/nogo.go
Browse files Browse the repository at this point in the history
Co-authored-by: Zhongpeng Lin <[email protected]>
  • Loading branch information
fmeum and linzhp authored Jul 27, 2024
1 parent fc56fe5 commit e0331de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions go/tools/builders/nogo.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ func runNogo(workDir string, nogoPath string, srcs []string, facts []archive, pa
return fmt.Errorf("error creating nogo log file: %v", err)
}
defer outLog.Close()
if err := cmd.Run(); err != nil {
if exitErr, ok := err.(*exec.ExitError); ok {
err := cmd.Run()
if err == nil {
return nil
}
if exitErr, ok := err.(*exec.ExitError); ok {
if !exitErr.Exited() {
cmdLine := strings.Join(args, " ")
return fmt.Errorf("nogo command '%s' exited unexpectedly: %s", cmdLine, exitErr.String())
Expand Down

0 comments on commit e0331de

Please sign in to comment.