Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/options.js')
-rw-r--r--lib/internal/options.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/internal/options.js b/lib/internal/options.js
index 1c97aaee977..aa9c52e6988 100644
--- a/lib/internal/options.js
+++ b/lib/internal/options.js
@@ -25,8 +25,13 @@ function getAliasesFromBinding() {
return aliasesMap;
}
-function getOptionValue(option) {
- return getOptionsFromBinding().get(option)?.value;
+function getOptionValue(optionName) {
+ const options = getOptionsFromBinding();
+ if (optionName.startsWith('--no-')) {
+ const option = options.get('--' + optionName.slice(5));
+ return option && !option.value;
+ }
+ return options.get(optionName)?.value;
}
function getAllowUnauthorized() {