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.
When using the
oras backupcommand 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: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.