Skip to content

Compression error hints can make wrong suggestions #88

@marcospb19

Description

@marcospb19

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions