From 61d92faf089a05ebeec2ec97565eae62aaed9a68 Mon Sep 17 00:00:00 2001 From: Marc Udoff Date: Tue, 20 Sep 2016 18:21:44 -0400 Subject: [PATCH] Add NODE_PRESERVE_SYMLINKS environment variable Add a way through environment variables to set the --preserve-symlinks flag. Any non-null value of NODE_PRESERVE_SYMLINKS will enable symlinks. Fixes: https://github.com/nodejs/node/issues/8509 --- doc/api/cli.md | 7 +++++++ src/node.cc | 5 +++++ test/parallel/test-require-symlink.js | 12 +++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 221d0c631a26e9..4ab6cf1760ddc7 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -277,6 +277,13 @@ added: v0.11.15 Data path for ICU (Intl object) data. Will extend linked-in data when compiled with small-icu support. +### `NODE_PRESERVE_SYMLINKS=1` + + +When set to `1`, instructs the module loader to preserve symbolic links when +resolving and caching modules. ### `NODE_REPL_HISTORY=file`