From 637d9e3544bf30ce3d7a5697ef750852bce583cd Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 16 Jan 2017 16:57:36 -0500 Subject: [PATCH] process: add NODE_NO_WARNINGS environment variable This commit adds support for a NODE_NO_WARNINGS environment variable, which duplicates the functionality of the --no-warnings command line flag. Fixes: https://github.com/nodejs/node/issues/10802 PR-URL: https://github.com/nodejs/node/pull/10842 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Evan Lucas Reviewed-By: Sam Roberts Reviewed-By: Italo A. Casas --- doc/api/cli.md | 6 ++++ doc/node.1 | 4 +++ lib/internal/process/warning.js | 2 +- test/parallel/test-env-var-no-warnings.js | 41 +++++++++++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-env-var-no-warnings.js diff --git a/doc/api/cli.md b/doc/api/cli.md index 985feee2414dc0..3efb7fa41a86b1 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -314,6 +314,12 @@ added: v0.11.15 Data path for ICU (Intl object) data. Will extend linked-in data when compiled with small-icu support. +### `NODE_NO_WARNINGS=1` + + +When set to `1`, process warnings are silenced. ### `NODE_REPL_HISTORY=file`