Skip to content

Commit

Permalink
add error wrap for target
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Mar 25, 2024
1 parent 82b8925 commit 8b21e04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/oras/internal/option/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (opts *Target) Parse() error {
opts.Type = TargetTypeRemote
if _, err := registry.ParseReference(opts.RawReference); err != nil {
return &oerrors.Error{
Err: fmt.Errorf("%q is an invalid reference", opts.RawReference),
Err: fmt.Errorf("%w: %q is an invalid reference", err, opts.RawReference),
Recommendation: "Please make sure the provided reference is in the form of <registry>/<repo>[:tag|@digest]",
}
}
Expand Down

0 comments on commit 8b21e04

Please sign in to comment.