Improve error message when attempting to publish without publish script defined (#415)

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

* Update src/index.ts

* Update src/index.ts
This commit is contained in:
Ben McCann
2024-10-14 18:44:02 +02:00
committed by GitHub
parent 50750fa876
commit 57ab80c611
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@changesets/action": patch
---
Improve error message when attempting to publish without publish script defined
+2 -2
View File
@@ -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`;