1
1
mirror of https://github.com/wader/fq.git synced 2024-12-24 13:52:02 +03:00

Merge pull request #477 from wader/better-decode-error-help

cli: Better decode error help
This commit is contained in:
Mattias Wadman 2022-11-02 12:40:11 +01:00 committed by GitHub
commit 5529084dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ def input:
| [ $opts.decode_format
, if $err | _is_string then ": \($err)"
# TODO: if not string assume decode itself failed for now
else ": failed to decode (try -d FORMAT)"
else ": failed to decode: try fq -d FORMAT to force format, see fq -h formats for list"
end
] | join("")
| (_error_str([$name]) | printerrln)

View File

@ -80,7 +80,7 @@ null
$ fq . a
exitcode: 4
stderr:
error: a: probe: failed to decode (try -d FORMAT)
error: a: probe: failed to decode: try fq -d FORMAT to force format, see fq -h formats for list
$ fq -i -d raw . a b c
raw, ...[0:3][]> ._format
"raw"
@ -98,4 +98,4 @@ exitcode: 4
stdin:
test
stderr:
error: <stdin>: probe: failed to decode (try -d FORMAT)
error: <stdin>: probe: failed to decode: try fq -d FORMAT to force format, see fq -h formats for list