Repository navigation
fix: Windows quick start (cross-shell initializeCommand) + install the Dev Containers extension (1.8.2) - #102
Merged
Merged
Conversation
…e Dev Containers extension The template's initializeCommand was bash-only, but devcontainers/cli runs it with cmd.exe /c on Windows (src/spec-node/utils.ts). The command failed there, so VS Code could not start the container on any new Windows install since 733dd73 (2026-04-07). The new command is valid in both shells: cmd.exe runs `ver` and skips the rest; /bin/sh runs the hostname capture. Windows gets the hostname from COMPUTERNAME via remoteEnv instead. - New Host Commands workflow: runs initializeCommand through the real devcontainers CLI (0.89.0) on windows-latest, with a control that must see the old bash-only command fail, plus a /bin/sh check on Linux. - install.ps1 / install.sh now install the VS Code Dev Containers extension for the user (no admin), finding `code` in the user/system install folders or the macOS app bundle when it is not on PATH. VS Code itself comes from Intune (Terje, 2026-09-25). - Contributor docs corrected: they still showed the old command and claimed the hostname file is written on Windows. - Plans: PLAN-fix-windows-quickstart moved to active; the handover contract agreed with client-provisioning (urb-agents #1505, #1514, #1533) recorded in PLAN-host-installer-handover. - Version 1.8.2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…atches a normal PC GitHub's windows-latest runner has Git for Windows' usr\bin (true.exe) on PATH. The old bash-only initializeCommand ended in that real `true` and exited 0, so the control step could not see the bug. A normal office PC has no Unix tools on PATH. Strip them and refuse to run if a Unix `true` is still found. Wording corrected: the bug hits PCs without Unix tools on PATH, not literally every PC. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Windows Quick Start. Terje reported on 2026-09-24 that it doesn't work on Windows.
The bug
devcontainer-user-template.jsonhad a bash-onlyinitializeCommand. The devcontainers CLI (the engine behind VS Code) runs a stringinitializeCommandwithcmd.exe /con Windows (devcontainers/clisrc/spec-node/utils.ts,runInitializeCommand), and a non-zero exit stops the container from starting. It regressed in733dd73(2026-04-07), after the Windows-specific command from February was dropped in the single shared template (d07e842).The fix
versucceeds and||skips the rest.verdoesn't exist, so the capture runs and ends intrue.COMPUTERNAMEviaremoteEnvinstead, whichconfig-host-info.shalready checks first.Also in this PR
Host Commandsworkflow:windows-latestrunsinitializeCommandthrough the real devcontainers CLI 0.89.0, the samecmd.exe /cpath and quoting as VS Code./bin/sh.install.ps1/install.shinstall the VS Code Dev Containers extension for the user, with no admin. They findcodein the user/system install folders or the macOS app bundle when it isn't on PATH. VS Code itself comes from Intune. Until PLAN-fix-windows-quickstart task 2.1 lands, a missing VS Code only prints a warning.Verification
/bin/shwrites.host-hostname.install.shis shellcheck-clean, and its step 4b ran against a stubcode(both the install and the skip case).install.ps1parses with 0 errors and has 0 PSScriptAnalyzer findings apart fromPSAvoidUsingWriteHost.npm run buildpasses.Host Commandsrun is the first time, and Terje's PC test follows after merge.🤖 Generated with Claude Code