From ffa73807006d698ddba7e6f80a6c86e6bf8ad3b5 Mon Sep 17 00:00:00 2001 From: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:43:43 -0400 Subject: [PATCH] fix git push --- scripts/components/changeset-client.ts | 1 + scripts/components/git-client.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/components/changeset-client.ts b/scripts/components/changeset-client.ts index 25d8d8b9f..e2c259b8c 100644 --- a/scripts/components/changeset-client.ts +++ b/scripts/components/changeset-client.ts @@ -45,6 +45,7 @@ export class ChangesetClient { .map((part) => part.trim()) .filter(Boolean); + // header is undefined when processing an empty changeset const packages = header ? header .split('\n') diff --git a/scripts/components/git-client.ts b/scripts/components/git-client.ts index 002605c91..7929f8d6c 100644 --- a/scripts/components/git-client.ts +++ b/scripts/components/git-client.ts @@ -104,7 +104,8 @@ export class GitClient { ); } - await this.execWithIO`git push ${force ? '--force' : ''}`; + await this + .execWithIO`git push ${force ? '--force' : ''} origin ${currentBranch}`; }; fetchTags = async () => {