Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(install): fail gracefully on occasional npm@2.15 hickups (#109)
* fix(install): fail gracefully on occasional npm@2.15 hickups * docs(install): use `npm explore` to rerun install script ... as well as mention the original issue on GitHub.
- Loading branch information
1 parent
817f3dc
commit 3ea9139
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env node | ||
try { | ||
const opt = require('opt-cli') | ||
if (!opt.testOptOut('ghooks-install')) { | ||
require('./install') | ||
} | ||
} catch (e) { | ||
console.warn( // eslint-disable-line no-console | ||
'\nghooks postinstall could not be completed.\n' + | ||
'==========================================\n\n' + | ||
'Usually this is due to using npm@2.15.x. Please consider updating npm\n' + | ||
'to its latest version or run the following command manually afterwards:\n\n' + | ||
'\tnpm explore ghooks -- npm run install\n\n' + | ||
'See https://github.com/gtramontina/ghooks/issues/71 for more information.\n' | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters