Skip to content

Commit 6dd1349

Browse files
committed
Fix unhandled SourceControlProviderError in runStackedAction
Wrap sourceControlProvider() call at line 1665 with Effect.catch fallback, matching the existing pattern in buildCompletionToast. The provider resolution is only used for cosmetic progress labels and should never abort the commit/push action.
1 parent 76dc275 commit 6dd1349

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/server/src/git/GitManager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,10 @@ export const makeGitManager = Effect.fn("makeGitManager")(function* () {
16631663
const currentBranch = branchStep.name ?? initialStatus.branch;
16641664
const commitAction = isCommitAction(input.action) ? input.action : null;
16651665
const changeRequestTerms = wantsPr
1666-
? getChangeRequestTerminologyForKind((yield* sourceControlProvider(input.cwd)).kind)
1666+
? yield* sourceControlProvider(input.cwd).pipe(
1667+
Effect.map((provider) => getChangeRequestTerminologyForKind(provider.kind)),
1668+
Effect.catch(() => Effect.succeed(getChangeRequestTerminologyForKind("unknown"))),
1669+
)
16671670
: null;
16681671

16691672
const commit = commitAction

0 commit comments

Comments
 (0)