Skip to content

Commit 57ab80c

Browse files
authored
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
1 parent 50750fa commit 57ab80c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/breezy-garlics-bathe.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@changesets/action": patch
3+
---
4+
5+
Improve error message when attempting to publish without publish script defined

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
4848

4949
switch (true) {
5050
case !hasChangesets && !hasPublishScript:
51-
core.info("No changesets found");
51+
core.info("No changesets present or were removed by merging release PR. Not publishing because no publish script found.");
5252
return;
5353
case !hasChangesets && hasPublishScript: {
5454
core.info(
55-
"No changesets found, attempting to publish any unpublished packages to npm"
55+
"No changesets found. Attempting to publish any unpublished packages to npm"
5656
);
5757

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

0 commit comments

Comments
 (0)