diff options
Diffstat (limited to 'deps/npm/node_modules/npm-lifecycle/index.js')
-rw-r--r-- | deps/npm/node_modules/npm-lifecycle/index.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/npm/node_modules/npm-lifecycle/index.js b/deps/npm/node_modules/npm-lifecycle/index.js index f775155d5e..337de71416 100644 --- a/deps/npm/node_modules/npm-lifecycle/index.js +++ b/deps/npm/node_modules/npm-lifecycle/index.js @@ -458,12 +458,17 @@ function makeEnv (data, opts, prefix, env) { return } var value = opts.config[i] - if (value instanceof Stream || Array.isArray(value)) return + if (value instanceof Stream || Array.isArray(value) || typeof value === 'function') return if (i.match(/umask/)) value = umask.toString(value) + if (!value) value = '' else if (typeof value === 'number') value = '' + value else if (typeof value !== 'string') value = JSON.stringify(value) + if (typeof value !== 'string') { + return + } + value = value.indexOf('\n') !== -1 ? JSON.stringify(value) : value |