commit 5aad1c733a8e1e661e9a650ad87e50c60d4f48ce
parent 510777eac13dd1fc5ff4cb506279ec06f8a44829
Author: Marc Stibane <marc@taler.net>
Date: Thu, 11 Jan 2024 09:02:47 +0100
Remove full file-path from stack traces
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/quickjs/qjsc.c b/quickjs/qjsc.c
@@ -305,7 +305,9 @@ static void compile_file(JSContext *ctx, FILE *fo,
eval_flags |= JS_EVAL_TYPE_MODULE;
else
eval_flags |= JS_EVAL_TYPE_GLOBAL;
- obj = JS_Eval(ctx, (const char *)buf, buf_len, filename, eval_flags);
+// obj = JS_Eval(ctx, (const char *)buf, buf_len, filename, eval_flags); // filename contains full path
+ obj = JS_Eval(ctx, (const char *)buf, buf_len, "<compiled_js>", eval_flags); // which we don't want to expose
+ // TODO: In the future we should to make this behavior configurable with a flag to qjsc
if (JS_IsException(obj)) {
js_std_dump_error(ctx);
exit(1);