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

Compression error hints can make wrong suggestions #88

Open
marcospb19 opened this issue Oct 14, 2021 · 0 comments
Open

Compression error hints can make wrong suggestions #88

marcospb19 opened this issue Oct 14, 2021 · 0 comments
Labels
bug Something isn't working medium priority pending decision We haven't concluded yet what to do

Comments

@marcospb19
Copy link
Member

marcospb19 commented Oct 14, 2021

Originally posted by @dcariotti in #84 (comment)

Problem

After running this:

ouch c 1.txt 2.txt archive.lz.tar

Ouch shows an error message:

[ERROR] Cannot compress to 'archive.lz.tar'.
 - You are trying to compress multiple files.
 - The compression format '.lz' cannot receive multiple files.
 - The only supported formats that archive files into an archive are .tar and .zip.

hint: Try inserting '.tar' or '.zip' before '.lz'.
hint: From: archive.lz.tar
hint:  To : archive.tar.lz.tar

However, if you follow what the hints suggest and use archive.tar.lz.tar:

ouch c 1.txt 2.txt archive.tar.lz.tar

You will receive the following error:

 - Found the format '.tar' in an incorrect position.
 - '.tar' can only be used at the start of the file extension.

hint: If you wish to compress multiple files, start the extension with '.tar'.
hint: Otherwise, remove '.tar' from 'archive.tar.lz.tar'.

Our hints are not ready for this specific errors.

Maybe it probably should just have said "you might want to move .tar to the start".

There are actually a lot of ways we can rethink those error messages to fix this issue, I'm not currently sure what's the best one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium priority pending decision We haven't concluded yet what to do
Projects
None yet
Development

No branches or pull requests

1 participant