-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve hints when decompressing with no extension
refactored `check_missing_formats_when_decompressing` to be aware of missing extensions and unsupported extensions in order to give a more detailed error message
- Loading branch information
1 parent
bc1d945
commit a26d3d3
Showing
6 changed files
with
81 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/snapshots/ui__ui_test_err_decompress_missing_extension-2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch decompress a b.unknown\", dir)" | ||
--- | ||
[ERROR] Cannot decompress files | ||
- Files with unsupported extensions: <FOLDER>/b.unknown | ||
- Files with missing extensions: <FOLDER>/a | ||
- Decompression formats are detected automatically from file extension | ||
|
||
hint: Supported extensions are: tar, zip, bz, bz2, gz, lz4, xz, lzma, sz, zst | ||
hint: Supported aliases are: tgz, tbz, tlz4, txz, tzlma, tsz, tzst | ||
|
14 changes: 14 additions & 0 deletions
14
tests/snapshots/ui__ui_test_err_decompress_missing_extension-3.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
source: tests/ui.rs | ||
expression: "run_ouch(\"ouch decompress b.unknown\", dir)" | ||
--- | ||
[ERROR] Cannot decompress files | ||
- Files with unsupported extensions: <FOLDER>/b.unknown | ||
- Decompression formats are detected automatically from file extension | ||
|
||
hint: Supported extensions are: tar, zip, bz, bz2, gz, lz4, xz, lzma, sz, zst | ||
hint: Supported aliases are: tgz, tbz, tlz4, txz, tzlma, tsz, tzst | ||
hint: | ||
hint: Alternatively, you can pass an extension to the '--format' flag: | ||
hint: ouch decompress <FOLDER>/b.unknown --format tar.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters