From d24491c6a726f7094e87cd6d38ddf615c198c99f 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 | 7 ++++ doc/node.1 | 4 +++ lib/internal/process/warning.js | 2 +- test/parallel/test-env-var-no-warnings.js | 41 +++++++++++++++++++++++ 4 files changed, 53 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 3f51c97b818d8d..30d4c62e52b8a1 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -287,6 +287,13 @@ 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_PRESERVE_SYMLINKS=1`