forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: nodejs#8509
- Loading branch information
Marc Udoff
committed
Oct 14, 2016
1 parent
2b5acda
commit 61d92fa
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4188,6 +4188,11 @@ void Init(int* argc, | |
V8::SetFlagsFromString(NODE_V8_OPTIONS, sizeof(NODE_V8_OPTIONS) - 1); | ||
#endif | ||
|
||
// Allow for environment set preserving symlinks. | ||
if (auto preserve_symlinks = secure_getenv("NODE_PRESERVE_SYMLINKS")) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mlucool
Owner
|
||
config_preserve_symlinks = (*preserve_symlinks == '1'); | ||
} | ||
|
||
// Parse a few arguments which are specific to Node. | ||
int v8_argc; | ||
const char** v8_argv; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I tried to track down the answer, but couldn't find the exact answer...
Why is this behind
secure_getenv
🤔?P.S. (love the PR in general)