fixed npm detection when fish is the default shell (#584)

This commit is contained in:
Eugene Pankov 2019-01-05 14:53:19 +01:00
parent 3aaf490f57
commit 1a258f32b0

View File

@ -48,7 +48,7 @@ export class PluginManagerService {
return return
} }
if (this.hostApp.platform !== Platform.Windows) { if (this.hostApp.platform !== Platform.Windows) {
this.envPath = (await exec('$SHELL -c -i \'echo $PATH\''))[0].toString().trim() this.envPath = (await exec('$SHELL -i -c \'echo $PATH\''))[0].toString().trim()
let searchPaths = this.envPath.split(':') let searchPaths = this.envPath.split(':')
for (let searchPath of searchPaths) { for (let searchPath of searchPaths) {
if (await fs.exists(path.join(searchPath, 'npm'))) { if (await fs.exists(path.join(searchPath, 'npm'))) {