Skip to content

Commit

Permalink
Improve error message emitted when metadata is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
liamfallon committed Apr 22, 2024
1 parent 48bb15a commit 3873a03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cli/commands/rpkg/push/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ func (r *runner) runE(cmd *cobra.Command, args []string) error {

rv, err := util.GetResourceVersion(&pkgResources)
if err != nil {
return errors.E(op, err)
errString := err.Error() + "\nuse \"porchctl rpkg pull\" to download the remote package metadata before pushing"
return errors.E(op, err, errString)
}
pkgResources.ResourceVersion = rv
if err = util.RemoveRevisionMetadata(&pkgResources); err != nil {
Expand Down

0 comments on commit 3873a03

Please sign in to comment.