diff --git a/.changeset/silver-toys-turn.md b/.changeset/silver-toys-turn.md new file mode 100644 index 000000000..941025b6f --- /dev/null +++ b/.changeset/silver-toys-turn.md @@ -0,0 +1,5 @@ +--- +"@changesets/cli": patch +--- + +Attempt to log `stdout` when publish fails if `stderr` is empty and JSON error can't be retrieved from none of those. diff --git a/packages/cli/src/commands/publish/npm-utils.ts b/packages/cli/src/commands/publish/npm-utils.ts index df10e8d7c..d72805ea2 100644 --- a/packages/cli/src/commands/publish/npm-utils.ts +++ b/packages/cli/src/commands/publish/npm-utils.ts @@ -214,7 +214,7 @@ async function internalPublish( ); } - error(stderr.toString()); + error(stderr.toString() || stdout.toString()); return { published: false }; } return { published: true };