Skip to content

Commit 76e4607

Browse files
committed
refactor(web): read worktree cleanup from the environment's filtered patch
1 parent 92ef200 commit 76e4607

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎apps/web/src/components/settings/scopedSettings.ts‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,17 @@ export function planScopedSettingsPatch(
329329
// so complete the patch from the target's effective value.
330330
const effective = resolveProjectSettings(settings, projectId).settings;
331331
const next: Record<string, unknown> = { ...current };
332-
for (const [key, value] of Object.entries(
333-
supportedServerPatch(environment, serverPatch),
334-
)) {
335-
if (key === "worktreeCleanup" && serverPatch.worktreeCleanup?.mode === "custom") {
332+
const environmentPatch = supportedServerPatch(environment, serverPatch);
333+
for (const [key, value] of Object.entries(environmentPatch)) {
334+
if (
335+
key === "worktreeCleanup" &&
336+
environmentPatch.worktreeCleanup?.mode === "custom"
337+
) {
336338
next[key] = {
337339
mode: "custom",
338340
rules: {
339341
...resolveWorktreeCleanup(settings, projectId),
340-
...serverPatch.worktreeCleanup.rules,
342+
...environmentPatch.worktreeCleanup.rules,
341343
},
342344
};
343345
continue;

0 commit comments

Comments
 (0)