mirror of
https://github.com/wader/fq.git
synced 2024-11-27 06:04:47 +03:00
cli: Better decode error help
This commit is contained in:
parent
0b5a2d2719
commit
41b2d1ad1b
@ -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