Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ux): improve error message for invalid registry and file reference #1258

Merged
merged 12 commits into from
Jan 31, 2024
2 changes: 1 addition & 1 deletion cmd/oras/root/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func addFile(ctx context.Context, store *file.Store, name string, mediaType stri
if err != nil {
var pathErr *fs.PathError
if errors.As(err, &pathErr) {
err = fmt.Errorf("%s: no such file or directory", pathErr.Path)
err = fmt.Errorf("%s %s: %w", pathErr.Op, pathErr.Path, pathErr.Err)
qweeah marked this conversation as resolved.
Show resolved Hide resolved
}
return ocispec.Descriptor{}, err
}
Expand Down
Loading