diff --git a/app/package.json b/app/package.json index 4856bbe8..8f472837 100644 --- a/app/package.json +++ b/app/package.json @@ -18,7 +18,7 @@ "gaze": "1.1.0", "mkdirp": "0.5.1", "ms": "0.7.1", - "shell-env": "0.1.2", + "shell-env": "0.2.0", "uuid": "2.0.2" }, "eslintConfig": { diff --git a/app/plugins.js b/app/plugins.js index 6f600cc1..7cc2c538 100644 --- a/app/plugins.js +++ b/app/plugins.js @@ -197,15 +197,19 @@ function toDependencies (plugins) { } function install (fn) { - shellEnv().then((env) => { - let registry = exports.getDecoratedConfig().npmRegistry; - if (registry) env.NPM_CONFIG_REGISTRY = registry; + const { shell: cfgShell, npmRegistry } = exports.getDecoratedConfig(); + + const shell = cfgShell && cfgShell !== '' ? cfgShell : undefined; + + shellEnv(shell).then((env) => { + if (npmRegistry) env.NPM_CONFIG_REGISTRY = npmRegistry; env.npm_config_runtime = 'electron'; env.npm_config_target = '1.3.0'; env.npm_config_disturl = 'https://atom.io/download/atom-shell'; - exec('npm prune && npm install --production', { + exec('npm prune; npm install --production', { cwd: path, - env: env + env, + shell }, (err, stdout, stderr) => { if (err) return fn(err); fn(null);