Fix #705 (--argfile weirdness)
This commit is contained in:
1 parent
c86ef36769
commit
3d2ab93b11
2 files changed
+3
-3
No files matched your search
@@ -218,7 +218,9 @@ sections:
|
|||||||
value to the jq program as a predefined variable. If you run jq
|
value to the jq program as a predefined variable. If you run jq
|
||||||
with `--argfile foo bar`, then `$foo` is available in the
|
with `--argfile foo bar`, then `$foo` is available in the
|
||||||
program and has the value resulting from parsing the content of
|
program and has the value resulting from parsing the content of
|
||||||
the file named `bar`.
|
the file named `bar`. The file is slurped. That means the
|
||||||
|
value loaded will be an array of the top-level JSON values found
|
||||||
|
in the file.
|
||||||
|
|
||||||
- title: Basic filters
|
- title: Basic filters
|
||||||
entries:
|
entries:
|
||||||
|
|||||||
@@ -316,8 +316,6 @@ int main(int argc, char* argv[]) {
|
|||||||
ret = 2;
|
ret = 2;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (jv_get_kind(data) == JV_KIND_ARRAY && jv_array_length(jv_copy(data)) == 1)
|
|
||||||
data = jv_array_get(data, 0);
|
|
||||||
arg = jv_object_set(arg, jv_string("value"), data);
|
arg = jv_object_set(arg, jv_string("value"), data);
|
||||||
program_arguments = jv_array_append(program_arguments, arg);
|
program_arguments = jv_array_append(program_arguments, arg);
|
||||||
i += 2; // skip the next two arguments
|
i += 2; // skip the next two arguments
|
||||||
|
|||||||
Reference in new issue
Block a user