Skip to content

Commit d6e7114

Browse files
fix(publish): Fix running of prepublishOnly script before publishing a package with a distDir
1 parent 7192553 commit d6e7114

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ if (!yargs.argv.dryrun) {
113113
// Publish to NPM and push to github
114114
if (!yargs.argv.dryrun) {
115115
const distDir = packageJson.distDir || '.';
116-
if (distDir !== '.' && packageJson.prepublishOnly) {
116+
if (distDir !== '.' && packageJson.scripts && packageJson.scripts.prepublishOnly) {
117117
_exec('npm run prepublishOnly')
118118
}
119119
shelljs.pushd(distDir);

0 commit comments

Comments
 (0)