Skip to content

Commit

Permalink
Handle image name error properly (#170)
Browse files Browse the repository at this point in the history
* Handle image name error properly

* 0.28.1
  • Loading branch information
baksetercx authored Jan 8, 2025
1 parent c3b5c6a commit 7eed860
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.28.0
0.28.1
7 changes: 5 additions & 2 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ func Build(_ context.Context, c *cli.Command) error {
systemName,
applicationName,
)
if err != nil {
return cli.Exit(err, 1)
}

additionalTags := utils.RemoveZeroValues(c.StringSlice("additional-tags"))

Expand Down Expand Up @@ -259,7 +262,7 @@ func Build(_ context.Context, c *cli.Command) error {
return fmt.Errorf(
"Failed to push Docker image cache to tag %s after scan reported vulnerabilities: %w",
cacheTag,
err,
pushImageOutput.Error,
)
}
}
Expand All @@ -277,7 +280,7 @@ func Build(_ context.Context, c *cli.Command) error {
); command.IsError(pushImageOutput) {
return fmt.Errorf(
"Failed to push Docker image. If using GHCR, please login using the command `gh auth login` first. %w",
err,
pushImageOutput.Error,
)
}
}
Expand Down

0 comments on commit 7eed860

Please sign in to comment.