Skip to content

fix(server): find Docker Desktop's bin dir on Windows for local VM image prep - #2130

Closed
kshivam4781 wants to merge 1 commit into
milind-soni:mainfrom
kshivam4781:fix/2117-docker-desktop-windows-path
Closed

kshivam4781 wants to merge 1 commit into
milind-soni:mainfrom
kshivam4781:fix/2117-docker-desktop-windows-path

Conversation

@kshivam4781

@kshivam4781 kshivam4781 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2117.

What changed

Added Docker Desktop's install directory to the list of well-known locations windowsKnownDirs() scans in server/env-path.ts, and a regression test for it in server/env-path.test.ts (modeled on the existing Antigravity one right above it).

Why

server/container-computer.ts spawns docker pull/docker build for local VM image prep with PATH: augmentedPath(). On Windows, augmentedPath() unions the inherited PATH with a hardcoded list of known install dirs, because a GUI app's inherited PATH can be missing things the user's real shell PATH has. Docker Desktop's bin dir (%ProgramFiles%\Docker\Docker\resources\bin, which holds both docker.exe and docker-credential-desktop.exe) wasn't on that list.

In practice docker.exe itself still gets found, so it looks like Docker is installed — but docker-credential-desktop.exe, which docker.exe shells out to on every registry pull, isn't, so image prep fails anyway. The reporter's workaround (setting OMB_EXTRA_PATH by hand) is exactly the escape hatch this known-dirs list exists to make unnecessary.

How it was verified

  • pnpm typecheck — clean.
  • pnpm exec vitest run server/env-path.test.ts — passes; the new test is Windows-only (it.skipIf(process.platform !== "win32"), same as the Antigravity one it's modeled on) so it reports as skipped here on Linux, not run. I don't have a Windows machine to hand, so I haven't seen it actually execute — flagging that honestly rather than claiming otherwise. It follows the exact same shape as the passing Antigravity test, so I'm fairly confident in it, but a run on the Windows CI shard is the real check.
  • pnpm lint — clean.

Screenshots (UI changes)

N/A — server-side PATH logic only, no UI touched.

Checklist

  • pnpm typecheck and pnpm test pass locally
  • Server behavior changes come with tests (see CONTRIBUTING.md → Tests)
  • No dist-server/ edits (it's build output)
  • macOS-only code is platform-gated; no shell: true / cmd.exe string-building
  • No secrets in logs, responses, events, or argv

Summary by CodeRabbit

  • Bug Fixes
    • Docker Desktop’s resources directory is now included in the augmented PATH on Windows when available.

…age prep

windowsKnownDirs() lists the install locations augmentedPath() scans on top of the inherited
PATH, but it didn't include Docker Desktop's bin dir. docker.exe still turns up because
something else on the machine's PATH usually finds it, but docker-credential-desktop.exe
(which docker.exe shells out to for every registry pull) often doesn't, so local VM image
prep fails even though "docker" itself looks installed. Adds the standard install path and
a regression test modeled on the existing Antigravity one. Fixes milind-soni#2117.
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

@kshivam4781 is attempting to deploy a commit to the SupaMaus Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e0aa4f42-4776-4105-986e-b28188421992

📥 Commits

Reviewing files that changed from the base of the PR and between 9f0c33d and eac5c25.

📒 Files selected for processing (2)
  • server/env-path.test.ts
  • server/env-path.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Windows PATH discovery now includes Docker Desktop’s resources\bin directory under ProgramFiles. A Windows-only test verifies that augmentedPath() includes the directory when it exists.

Changes

Docker Desktop PATH discovery

Layer / File(s) Summary
Add and verify Windows PATH discovery
server/env-path.ts, server/env-path.test.ts
windowsKnownDirs() adds Docker Desktop’s resources\bin directory under ProgramFiles, using C:\Program Files if the variable is unset. The Windows-only test checks that augmentedPath() includes the directory when it exists. It restores the environment, resets the path cache, and removes the test directory.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: milind-soni

Merge Risk: ⚪ Minimal · up to eac5c

Docker Desktop’s standard Windows directory is now available on the augmented PATH, enabling Docker and its credential helper to be discovered. No merge-blocking issue is evident in the reviewed change.

Architecture Summary

Architecture risk: 🔵 Low · up to eac5c

The change affects 1 system.

Changed systems: server

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — server (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in server/env-path.test.ts: Adds a Windows-only PATH augmentation test that verifies Docker Desktop’s Docker\Docker\resources\bin directory under ProgramFiles is included when it exists, and restores ProgramFiles, resets the path cache, and removes the temporary directory afterward.
  • observed — Modified behavior in server/env-path.ts: windowsKnownDirs() adds Docker Desktop’s resources\bin directory under ProgramFiles, using C:\Program Files when the environment variable is unset.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding Docker Desktop's Windows bin directory to PATH discovery for local VM image preparation.
Description check ✅ Passed The description includes the required sections, explains the problem and solution, documents verification commands, identifies that the Windows-only test was skipped on Linux, and completes the checkl…
Linked Issues check ✅ Passed Issue #2117 requires Docker Desktop's installation directory to be available to the child Docker process on Windows. The PR adds %ProgramFiles%\\\\Docker\\\\Docker\\\\resources\\\\bin to `windowsKnownDirs()…
Out of Scope Changes check ✅ Passed The diff contains only the Docker Desktop path entry and its focused regression test. Both changes directly support issue #2117. No unrelated production or test changes are present.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@milind-soni

Copy link
Copy Markdown
Owner

The reviewed changes from this source PR were incorporated into #2155 and are on main at merge commit 3e55827, with original author commits and integration repairs preserved. Closing this source PR as incorporated.

@milind-soni milind-soni closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Local VM image preparation fails because docker-credential-desktop is missing from child PATH

2 participants