fix undefined fish shell match (#1516)

* fix undefined fish shell match

* check for string
This commit is contained in:
Henrik 2017-02-16 18:23:57 +01:00 committed by Guillermo Rauch
parent 77babd36e3
commit 63ab33daa9

View file

@ -241,7 +241,7 @@ function install(fn) {
posix: 'npm prune && npm install --production'
};
// determine the shell we're running in
const whichShell = shell.match(/fish/) ? 'fish' : 'posix';
const whichShell = (typeof cfgShell === 'string' && cfgShell.match(/fish/)) ? 'fish' : 'posix';
// Use the install command that is appropriate for our shell
exec(installCommands[whichShell], {
cwd: path,