Fix varlock run on Windows: correct cmd.exe command string quoting#618
Merged
philmillman merged 4 commits intomainfrom Apr 15, 2026
Merged
Fix varlock run on Windows: correct cmd.exe command string quoting#618philmillman merged 4 commits intomainfrom
varlock run on Windows: correct cmd.exe command string quoting#618philmillman merged 4 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 485322d The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/bb537903-5b72-41f9-b2f0-eed34152c8d0 Co-authored-by: philmillman <3722211+philmillman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/bb537903-5b72-41f9-b2f0-eed34152c8d0 Co-authored-by: philmillman <3722211+philmillman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dmno-dev/varlock/sessions/bb537903-5b72-41f9-b2f0-eed34152c8d0 Co-authored-by: philmillman <3722211+philmillman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix varlock run command for Windows compatibility
Fix Apr 15, 2026
varlock run on Windows: correct cmd.exe command string quoting
commit: |
Member
|
tested (and repro'd) on win11 pro with npm/npx and it works |
philmillman
approved these changes
Apr 15, 2026
theoephraim
approved these changes
Apr 15, 2026
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.
varlock runfails on Windows when spawning.cmd-backed commands liketsxorpnpm. Two failure modes:tsx watch src/index.ts→The system cannot find the path specified.pnpm dlx auth generate→"dlx" "auth" "generate" is not recognized as an internal or external commandRoot cause
The
needsShellblock inexec.tswas individually quoting each token:cmd.exe /s /cstrips only the first and last"from the entire string, leaving a stray"after the command name:Changes
"..."pair, so cmd.exe's/sstripping consumes only those outer quotes and leaves the inner content intact:", with embedded"escaped as""(cmd.exe convention). ExtractedescapeCmdExeArg()helper to avoid duplication.findCommandcan't resolve a bare name to a.cmd/.batpath,needsShellnow also fires so cmd.exe performs its own PATHEXT lookup (tsx→tsx.cmd,pnpm→pnpm.cmd) instead of failing with ENOENT.