From: Dmitry Volyntsev Date: Fri, 8 Feb 2019 17:14:55 +0000 (+0300) Subject: Shell: avoid reporting filenames in exception is quiet mode. X-Git-Tag: 0.2.8~32 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=d8c79f459c1cbab9f0fd9d5859d0680ef4e41111;p=njs.git Shell: avoid reporting filenames in exception is quiet mode. --- diff --git a/njs/njs_shell.c b/njs/njs_shell.c index 26a24ade..3b72c079 100644 --- a/njs/njs_shell.c +++ b/njs/njs_shell.c @@ -214,11 +214,13 @@ main(int argc, char **argv) nxt_memzero(&vm_options, sizeof(njs_vm_opt_t)); - if (opts.file != NULL) { - nxt_file_name(&vm_options.file, opts.file); + if (!opts.quiet) { + if (opts.file != NULL) { + nxt_file_name(&vm_options.file, opts.file); - } else { - vm_options.file = nxt_string_value("shell"); + } else { + vm_options.file = nxt_string_value("shell"); + } } vm_options.init = !opts.interactive;