Skip to content

Commit

Permalink
CmdRunAction: avoid duplication err message output (#58)
Browse files Browse the repository at this point in the history
Signed-off-by: zhanluxianshen <[email protected]>
  • Loading branch information
zhanluxianshen authored Nov 22, 2024
1 parent f934f45 commit ae31b33
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions internal/app/apprun/apprun.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,15 @@ func CmdRunAction(c *cli.Context) error {
os.Exit(exitCode)
}
fmt.Println(err)
} else {
if len(stdout) > 0 {
fmt.Fprint(os.Stdout, string(stdout))
}
if len(stderr) > 0 {
fmt.Fprint(os.Stderr, string(stderr))
}
}
if len(stdout) > 0 {
fmt.Fprint(os.Stdout, string(stdout))
}
if len(stderr) > 0 {
fmt.Fprint(os.Stderr, string(stderr))
}

return nil
}

Expand Down

0 comments on commit ae31b33

Please sign in to comment.