fix(pre): not running during npm pack

This commit is contained in:
Stephan Bönnemann 2015-04-21 14:21:57 +02:00
parent 36f5555d8e
commit 749eb11e58

View File

@ -30,7 +30,11 @@ if (~argv._.indexOf('pre')) {
if (npmArgv['semantic-release-rerun']) process.exit(0)
// the `prepublish` hook is also executed when the package is installed
// in this case we abort the command and do nothing.
if (isAbbrev(npmArgv, 'install') || isAbbrev(npmArgv, 'link')) process.exit(0)
if (
isAbbrev(npmArgv, 'install') ||
isAbbrev(npmArgv, 'link') ||
isAbbrev(npmArgv, 'pack')
) process.exit(0)
if (argv.debug) console.log('This is a dry run')