1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Load library from ~/.jq

This commit is contained in:
Brendan Macmillan
2013-05-17 03:03:42 +10:00
parent f0b982795c
commit 6e373942e5
6 changed files with 58 additions and 15 deletions

View File

@@ -611,8 +611,10 @@ struct bytecode* jq_compile_args(const char* str, jv args) {
jv_free(name);
}
jv_free(args);
program = builtins_bind(program);
nerrors = block_compile(program, &locations, &bc);
nerrors = builtins_bind(&program);
if (nerrors == 0) {
nerrors = block_compile(program, &locations, &bc);
}
}
if (nerrors) {
fprintf(stderr, "%d compile %s\n", nerrors, nerrors > 1 ? "errors" : "error");