From af782dd5f56463fcd2a6a0af918569d70696551f Mon Sep 17 00:00:00 2001 From: Royce Date: Tue, 13 Oct 2026 23:51:28 +0800 Subject: [PATCH] fix(setup): treat empty DSH_HOME as unset (#2686) * fix(setup): treat empty DSH_HOME as unset (#2666) The released `@deepseek-ai/dsh-home-paths` package explicitly treats an empty or whitespace-only `DSH_HOME` as unset and selects the default Harness home patch. `dshHomeDirectory` previously used nullish coalescing (`env.DSH_HOME ?? join(home, ".dsh")`), so an empty override flowed straight through `join(..., "cordis.patch.yml")` and produced a cwd-relative `cordis.patch.yml` outside the client-selected home. Treat empty and whitespace-only overrides as unset, matching the sibling OpenCode override resolver and the released DSH resolver. The patch now lands at `$DSH_HOME/cordis.patch.yml` for explicit overrides, the default `~/.dsh/cordis.patch.yml` for empty/unset, and trimmed whitespace for padded overrides. Adds `src/application/SupportedClients.test.ts` covering the empty, whitespace-only, unset, padded, and explicit cases via the public `supportedClients(...)` entrypoint. Fixes #2666. * test(setup): remove superseded DSH path unit coverage --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> --- src/application/SupportedClients.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application/SupportedClients.ts b/src/application/SupportedClients.ts index 55a651a52..7c3811a23 100644 --- a/src/application/SupportedClients.ts +++ b/src/application/SupportedClients.ts @@ -539,7 +539,7 @@ export const SUPPORTED_CLIENT_DEFINITIONS = [ configPath: ({ home, platform, env }: ClientPathContext) => join(devinDirectory({ home, platform, env }), "mcp_config.json"), markerPath: devinDirectory, - format: "json", + format: "devin", }, { name: "opencode",