Skip to content

Improve error message in oras backup when output .tar path is a directory #1831

@Wwwsylvia

Description

@Wwwsylvia

When using the oras backup command with an output path ending in .tar, the tool attempts to create a tar archive at that location. However, if a directory with the same name already exists, the command fails with an error message:

$ oras backup localhost:5001/oras-cli --include-referrers --output oras-tool.tar

Error: unable to create output file oras-tool.tar: open oras-tool.tar: is a directory

Some users might not understand this error. We should consider enhancing the message to clearly indicate that the target path already exists as a directory and cannot be used as a tar archive output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    uxUser experience related

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions