Repository navigation
fix(server): find Docker Desktop's bin dir on Windows for local VM image prep - #2130
kshivam4781 wants to merge 1 commit into
Conversation
…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.
|
@kshivam4781 is attempting to deploy a commit to the SupaMaus Team on Vercel. A member of the Team first needs to authorize it. |
|
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 configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughWindows PATH discovery now includes Docker Desktop’s ChangesDocker Desktop PATH discovery
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to 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 SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
Fixes #2117.
What changed
Added Docker Desktop's install directory to the list of well-known locations
windowsKnownDirs()scans inserver/env-path.ts, and a regression test for it inserver/env-path.test.ts(modeled on the existing Antigravity one right above it).Why
server/container-computer.tsspawnsdocker pull/docker buildfor local VM image prep withPATH: 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 bothdocker.exeanddocker-credential-desktop.exe) wasn't on that list.In practice
docker.exeitself still gets found, so it looks like Docker is installed — butdocker-credential-desktop.exe, whichdocker.exeshells out to on every registry pull, isn't, so image prep fails anyway. The reporter's workaround (settingOMB_EXTRA_PATHby 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 typecheckandpnpm testpass locallydist-server/edits (it's build output)shell: true/ cmd.exe string-buildingSummary by CodeRabbit