diff --git a/bin/publish.js b/bin/publish.js index 0a43b7c483..59771cd8f0 100644 --- a/bin/publish.js +++ b/bin/publish.js @@ -114,8 +114,7 @@ function checkAndPublishPackage(packageDir, repoCommit, peerDependencies) { stdio: 'inherit' }); if (result.status) { - error(`Spawn exited with code ${result.status}`); - process.exit(result.status); + throw new Error(`Spawn exited with code ${result.status}`); } return { isStableRelease, nextVersion };