mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Add support for the fish shell (#1181)
* Add support for the fish shell Fixes #1142 The fish shell is not POSIX-compliant. As a result, the installation command's use of `&&` caused `updatePlugins` to fail, erroneously claiming there would be details in `~/.hyper_plugins/npm-debug.log`. They of course weren't there because the command it tried to run was an invalid command. I've added an object to choose the install command to run based on the shell you're in, and a very basic test to determine if we're in fish. Most shells should be able to be handled by the 'default' key, so for now it just checks to see if it's fish by doing a regex on the configured `shell` option. * Rename default -> posix
This commit is contained in:
parent
edff890f5f
commit
993b8f6833
1 changed files with 9 additions and 1 deletions
|
|
@ -235,7 +235,15 @@ function install(fn) {
|
|||
env.npm_config_target = process.versions.electron;
|
||||
env.npm_config_disturl = 'https://atom.io/download/atom-shell';
|
||||
/* eslint-enable camelcase */
|
||||
exec('npm prune && npm install --production', {
|
||||
// Shell-specific installation commands
|
||||
const installCommands = {
|
||||
fish: 'npm prune; and npm install --production',
|
||||
posix: 'npm prune && npm install --production'
|
||||
};
|
||||
// determine the shell we're running in
|
||||
const whichShell = shell.match(/fish/) ? 'fish' : 'posix';
|
||||
// Use the install command that is appropriate for our shell
|
||||
exec(installCommands[whichShell], {
|
||||
cwd: path,
|
||||
env,
|
||||
shell
|
||||
|
|
|
|||
Loading…
Reference in a new issue