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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/nopt/lib/nopt.js')
-rw-r--r--node_modules/nopt/lib/nopt.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/node_modules/nopt/lib/nopt.js b/node_modules/nopt/lib/nopt.js
index 223ebfe00..5309a00fc 100644
--- a/node_modules/nopt/lib/nopt.js
+++ b/node_modules/nopt/lib/nopt.js
@@ -126,6 +126,8 @@ function validateString (data, k, val) {
function validatePath (data, k, val) {
if (val === true) return false
+ if (val === null) return true
+
val = String(val)
var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//
if (val.match(homePattern) && process.env.HOME) {