Welcome! Log In Create A New Profile

Advanced

[njs] Shell: avoid reporting filenames in exception is quiet mode.

Dmitry Volyntsev
February 08, 2019 12:22PM
details: https://hg.nginx.org/njs/rev/7978bb236657
branches:
changeset: 770:7978bb236657
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Feb 08 20:14:55 2019 +0300
description:
Shell: avoid reporting filenames in exception is quiet mode.

diffstat:

njs/njs_shell.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)

diffs (21 lines):

diff -r cb7ccf9edc68 -r 7978bb236657 njs/njs_shell.c
--- a/njs/njs_shell.c Fri Feb 08 20:06:05 2019 +0300
+++ b/njs/njs_shell.c Fri Feb 08 20:14:55 2019 +0300
@@ -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;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Shell: avoid reporting filenames in exception is quiet mode.

Dmitry Volyntsev 88 February 08, 2019 12:22PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready