Skip to content
Permalink
Browse files

fix(tabtab): dont install tabtab in a development environment and ign…

…ore tabtab install errors

ISSUES CLOSED: #98
  • Loading branch information
MarshallOfSound authored and malept committed Jan 27, 2017
1 parent aa8034b commit f0cb041767b5398b4467e2743345b0dbd60d942f
Showing with 12 additions and 1 deletion.
  1. +1 −1 package.json
  2. +11 −0 tabtab-install.js
@@ -13,7 +13,7 @@
"precommit": "npm run lint",
"commit": "git-cz",
"docs": "esdoc",
"install": "tabtab install --auto",
"install": "node tabtab-install.js",
"lint": "eslint src test gulpfile.babel.js",
"prepublish": "gulp build",
"pretest": "gulp build",
@@ -0,0 +1,11 @@
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));
}

0 comments on commit f0cb041

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