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:
commit
5529084dc1
@ -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)
|
||||
|
4
pkg/interp/testdata/inputs.fqtest
vendored
4
pkg/interp/testdata/inputs.fqtest
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user