Skip to content

Commit

Permalink
Improve error message when attempting to publish without publish scri…
Browse files Browse the repository at this point in the history
…pt defined (#415)

* Improve error message when attempting to publish without publish script defined

* Update src/index.ts

* Update src/index.ts
  • Loading branch information
benmccann authored Oct 14, 2024
1 parent 50750fa commit 57ab80c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-garlics-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@changesets/action": patch
---

Improve error message when attempting to publish without publish script defined
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;

switch (true) {
case !hasChangesets && !hasPublishScript:
core.info("No changesets found");
core.info("No changesets present or were removed by merging release PR. Not publishing because no publish script found.");
return;
case !hasChangesets && hasPublishScript: {
core.info(
"No changesets found, attempting to publish any unpublished packages to npm"
"No changesets found. Attempting to publish any unpublished packages to npm"
);

let userNpmrcPath = `${process.env.HOME}/.npmrc`;
Expand Down

0 comments on commit 57ab80c

Please sign in to comment.