Skip to content

Commit

Permalink
Display error output if pushing to remote registry fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rolftimmermans committed Nov 13, 2024
1 parent 2e25307 commit 3387698
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.5.2

* Display error output if pushing to remote registry fails.

# v2.5.1

* Fix `kd build` to include output to an image even if this is not default.
Expand Down
7 changes: 6 additions & 1 deletion pkg/util/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ func RunWithoutStdErr(log *Logger, name string, args ...string) error {
cmd.Stdout = os.Stdout
cmd.Stderr = buf

return cmd.Run()
if err := cmd.Run(); err != nil {
os.Stdout.Write(buf.Bytes())
return err
}

return nil
}

func RunInteractively(log *Logger, name string, args ...string) error {
Expand Down

0 comments on commit 3387698

Please sign in to comment.