Skip to content
Permalink
Browse files

fix(generic): fix installing tab completion when installing Forge loc…

…ally
  • Loading branch information
malept committed Aug 19, 2017
1 parent 4225683 commit 7ea4981232811f35bd75690cdb87bac35ca0b3f6
Showing with 6 additions and 10 deletions.
  1. +6 −10 tabtab-install.js
@@ -1,11 +1,7 @@
const fs = require('fs');
const path = require('path');
const { findActualExecutable, spawnPromise } = require('spawn-rx');

const tabtabPath = path.resolve(__dirname, './node_modules/.bin/tabtab');

if (!fs.existsSync(path.resolve(__dirname, 'src'))) {
spawnPromise(findActualExecutable(tabtabPath).cmd, ['install', '--auto'], {
stdio: 'inherit',
}).catch(err => console.error('Failed to install tab completion:', err));
process.argv.push('install');
process.argv.push('--auto');
try {
require('tabtab/src/cli');
} catch (e) {
console.warning(`Failed to install tab completion: ${e}`);
}

0 comments on commit 7ea4981

Please sign in to comment.
You can’t perform that action at this time.