Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to log when publish fails if is empty and JSON error can't be retrieved from none of those #844

Merged
merged 1 commit into from Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .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.
2 changes: 1 addition & 1 deletion packages/cli/src/commands/publish/npm-utils.ts
Expand Up @@ -214,7 +214,7 @@ async function internalPublish(
);
}

error(stderr.toString());
error(stderr.toString() || stdout.toString());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not sure if this is going to help anything - but IMHO it's worth doing regardless.

return { published: false };
}
return { published: true };
Expand Down