Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-ci-rebase-abort-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"lingo.dev": patch
---

fix(cli): handle rebase abort gracefully when no rebase is in progress
10 changes: 7 additions & 3 deletions packages/cli/src/cli/cmd/ci/flows/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,13 @@ export class PullRequestFlow extends InBranchFlow {
} catch (error) {
this.ora.warn("Rebase failed, falling back to alternative sync method");

this.ora.start("Aborting failed rebase");
execSync("git rebase --abort", { stdio: "inherit" });
this.ora.succeed("Aborted failed rebase");
try {
this.ora.start("Aborting failed rebase");
execSync("git rebase --abort", { stdio: "inherit" });
this.ora.succeed("Aborted failed rebase");
} catch {
this.ora.warn("No rebase in progress to abort");
}

this.ora.start(
`Resetting to ${this.platformKit.platformConfig.baseBranchName}`,
Expand Down