Skip to content

Commit

Permalink
Check metadata if err is nil (#2312)
Browse files Browse the repository at this point in the history
Signed-off-by: Teresa Romero <teresa@okteto.com>
  • Loading branch information
teresaromero committed Mar 4, 2022
1 parent 0105251 commit 40f7d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func buildWithOkteto(ctx context.Context, buildOptions BuildOptions) error {
return err
}

if buildOptions.Tag != "" {
if err == nil && buildOptions.Tag != "" {
if _, err := registry.GetImageTagWithDigest(buildOptions.Tag); err != nil {
oktetoLog.Yellow(`Failed to push '%s' metadata to the registry:
%s,
Expand Down

0 comments on commit 40f7d8f

Please sign in to comment.