From 49902124a9d697e441dbf724aa6b26bd98f75dd0 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 1679033cf87585..8436754f5b84c0 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -301,6 +301,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`