fix: validate Windows managed updates through the package entry - #351
Merged
Merged
Conversation
hetaoBackend
approved these changes
Sep 24, 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.
Change
The Windows managed updater validates a staged installation by launching the generated
mcode.cmd. A Windows Node 24.14.1 reproduction under Wine failed with exit 9009 when the installation path contained spaces. Resolve the installed package'smcodebin entry and invoke it with the current Node executable, retaining launcher-presence and exact-version checks. Collect child output untilclosebefore comparing the version.Keep npm installation on the existing
cross-spawnpath so the selected npm launcher retains its environment and argument handling. Reuse the package-bin helpers, and keep managed-install detection available from its existing export while removing the resulting import cycle.Extend the existing Windows contract with real offline npm installations through
McodeUpdateService.applyin a path containing Unicode, spaces, ampersands and parentheses. Cover standard npm and custom wrappers with either an external or adjacent npm CLI. The wrapper cases require the wrapper's environment setting to create the launcher and assert that the wrapper ran.Related to #346. The reported native Windows failure has not been reproduced through the original production helper; the issue's raw Node reproduction bypasses
cross-spawn.Validation
bba5c12.git diff --checkpassed.pnpm verify, full profile, macOS arm64 / Node 22.22.2, commitbba5c12: PASS, 15 gates (capability suite: 4,585 passed, 14 skipped).Publication and contribution checks
Maintainer handoff
Publication scope and licenses are unchanged.
Shared-source port: pending.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.