mirror of
https://github.com/wader/fq.git
synced 2024-12-23 21:31:33 +03:00
cli: Fix error filename on script error
This commit is contained in:
parent
ac8cfca500
commit
10d7ed7806
@ -8,7 +8,7 @@ For more information see https://github.com/wader/fq
|
|||||||
|
|
||||||
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
||||||
--compact,-c Compact output
|
--compact,-c Compact output
|
||||||
--decode,-d NAME Decode format (default probe)
|
--decode,-d NAME Decode format (probe)
|
||||||
--file,-f PATH Read EXPR from file
|
--file,-f PATH Read EXPR from file
|
||||||
--formats Show supported formats
|
--formats Show supported formats
|
||||||
--help,-h Show help
|
--help,-h Show help
|
||||||
|
@ -581,6 +581,7 @@ def _main:
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
expr_eval_path: $args_opts.expr_file,
|
||||||
filenames: (
|
filenames: (
|
||||||
( if $args_opts.expr_file then $rest
|
( if $args_opts.expr_file then $rest
|
||||||
else $rest[1:]
|
else $rest[1:]
|
||||||
|
6
pkg/interp/testdata/exprfile.fqtest
vendored
6
pkg/interp/testdata/exprfile.fqtest
vendored
@ -2,6 +2,8 @@
|
|||||||
123
|
123
|
||||||
/test2.jq:
|
/test2.jq:
|
||||||
.headers[0].magic | tovalue
|
.headers[0].magic | tovalue
|
||||||
|
/err.jq:
|
||||||
|
asdad)
|
||||||
/test.mp3:
|
/test.mp3:
|
||||||
$ fq -n -f /test.jq
|
$ fq -n -f /test.jq
|
||||||
123
|
123
|
||||||
@ -9,3 +11,7 @@ $ fq -n -f /test.jq
|
|||||||
123
|
123
|
||||||
$ fq -f /test2.jq /test.mp3
|
$ fq -f /test2.jq /test.mp3
|
||||||
"ID3"
|
"ID3"
|
||||||
|
$ fq -nf /err.jq
|
||||||
|
exitcode: 3
|
||||||
|
stderr:
|
||||||
|
error: /err.jq:1:6: unexpected token ")"
|
||||||
|
Loading…
Reference in New Issue
Block a user