Eval CLI included files as scripts

After 8cd59bf7c4 any file included by qjs
with -I that would parse as a module is eval'd as so, which is usually
not the intent, but rather to define some global functions.
This commit is contained in:
Saúl Ibarra Corretgé 2024-10-24 16:56:32 +02:00
parent cc11a829e8
commit 0c8aeb1d50

2
qjs.c
View file

@ -530,7 +530,7 @@ int main(int argc, char **argv)
}
for(i = 0; i < include_count; i++) {
if (eval_file(ctx, include_list[i], module))
if (eval_file(ctx, include_list[i], 0))
goto fail;
}