mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
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:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@changesets/action": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve error message when attempting to publish without publish script defined
|
||||||
+2
-2
@@ -48,11 +48,11 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
|||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case !hasChangesets && !hasPublishScript:
|
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;
|
return;
|
||||||
case !hasChangesets && hasPublishScript: {
|
case !hasChangesets && hasPublishScript: {
|
||||||
core.info(
|
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`;
|
let userNpmrcPath = `${process.env.HOME}/.npmrc`;
|
||||||
|
|||||||
Reference in New Issue
Block a user