From 40ffa43b0e811c9f54791de475dd82e0e57e663e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 24 Oct 2024 16:56:32 +0200 Subject: [PATCH] Eval CLI included files as scripts After 8cd59bf7c439e3370143924813ad6684918795c5 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. --- qjs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qjs.c b/qjs.c index 56315430..29af9b6d 100644 --- a/qjs.c +++ b/qjs.c @@ -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; }