Skip to content

Commit e5597b5

Browse files
hoxyqfacebook-github-bot
authored andcommitted
fix(publishing-bumped-packages): look for status code instaead of stderr
Summary: Changelog: [Internal] This fixes CircleCI job, which is responsible for publishing bumped packages. We should not check for `stderr`, apparently `npm` uses it to store debug information: - npm/npm#118 (comment) So we've tried to use this on 0.71-stable before and it succesfully published one package, but have exited right after it because `stderr` was not empty Differential Revision: D42836212 fbshipit-source-id: 8dfaa05c552589c9deac1a8184c14017d13bfdf3
1 parent 8d5f880 commit e5597b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/monorepo/find-and-publish-all-bumped-packages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ const findAndPublishAllBumpedPackages = () => {
103103

104104
const npmOTPFlag = NPM_CONFIG_OTP ? `--otp ${NPM_CONFIG_OTP}` : '';
105105

106-
const {stderr} = spawnSync('npm', ['publish', `${npmOTPFlag}`], {
106+
const {status} = spawnSync('npm', ['publish', `${npmOTPFlag}`], {
107107
cwd: packageAbsolutePath,
108108
shell: true,
109109
stdio: 'pipe',
110110
encoding: 'utf-8',
111111
});
112-
if (stderr) {
112+
if (status !== 0) {
113113
console.log(
114114
`\u274c Failed to publish version ${nextVersion} of ${packageManifest.name}:`,
115115
);

0 commit comments

Comments
 (0)