Skip to content

Commit

Permalink
fix(publish): ensure zero exit code when EWORKINGTREE warning occurs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-leo committed Mar 2, 2023
1 parent ce2ceca commit 9c00a33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ index SHA..SHA 100644
--- a/packages/package-1/package.json
+++ b/packages/package-1/package.json
@@ -3 +3 @@
- "version": "1.0.0",
+ "version": "2.0.0",
- "version": "1.0.0",
+ "version": "2.0.0",
diff --git a/packages/package-2/package.json b/packages/package-2/package.json
index SHA..SHA 100644
--- a/packages/package-2/package.json
Expand Down
4 changes: 2 additions & 2 deletions integration/__tests__/lerna-publish-transitive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ index SHA..SHA 100644
--- a/packages/package-1/package.json
+++ b/packages/package-1/package.json
@@ -4 +4 @@
- "version": "1.0.0",
+ "version": "2.0.0",
- "version": "1.0.0",
+ "version": "2.0.0",
diff --git a/packages/package-2/package.json b/packages/package-2/package.json
index SHA..SHA 100644
--- a/packages/package-2/package.json
Expand Down
1 change: 1 addition & 0 deletions libs/commands/publish/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ class PublishCommand extends Command {
// (we tried)
this.logger.silly("EWORKINGTREE", err.message);
this.logger.notice("FYI", "Unable to verify working tree, proceed at your own risk");
process.exitCode = 0;
} else {
// validation errors should be preserved
throw err;
Expand Down

0 comments on commit 9c00a33

Please sign in to comment.