fix: mirror shims in installer/script paths + extract common module#192
Merged
Sunrisepeak merged 4 commits intomainfrom Mar 8, 2026
Merged
fix: mirror shims in installer/script paths + extract common module#192Sunrisepeak merged 4 commits intomainfrom
Sunrisepeak merged 4 commits intomainfrom
Conversation
The initial fix only covered cmd_use(), but xlings install triggers shim creation via installer.cppm and script.cppm which bypass cmd_use. Also rewrites the e2e test to use `xlings install` (workspace-driven) with proper global subos cleanup before test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move duplicated shim mirroring logic from commands.cppm, installer.cppm and script.cppm into a reusable common::mirror_shim_to_global_bin(). Also fix installer and script paths which were missing the mirror call (xlings install bypasses cmd_use, so shims were not mirrored). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add PowerShell version of the shim mirror test and include it in Windows CI as E2E-05. Also add fixture index preparation step to Windows CI workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Copy xlings.exe to homeDir\bin\xlings.exe (matching C++ primary lookup path on Windows) instead of homeDir\xlings.exe - Replace PowerShell `trap` with try/finally to avoid spurious "system cannot find the path" errors on each pipeline error Co-Authored-By: Claude Opus 4.6 <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.
Summary
Follow-up to #191. Fixes two issues discovered after the initial merge:
cmd_use()—xlings install(workspace-driven) creates shims via the installer path, not throughcmd_use(). Shims were only mirrored incmd_use(), soxlings installin project context still left global subos bin empty.common::mirror_shim_to_global_bin()into a newcore/common.cppmmodule, replacing ~30 lines of inline duplication acrosscommands.cppm,installer.cppm, andscript.cppm.xlings install(notinstall+use) to match real user flow, with proper global subos cleanup before test.Changes
core/common.cppmmirror_shim_to_global_bin()core/xvm/commands.cppmcommon::mirror_shim_to_global_bin()core/xim/installer.cppmcore/xim/libxpkg/types/script.cppmtests/e2e/project_shim_mirror_test.shxlings install, clean global subos before testTest plan
project_shim_mirror_test.shpasses locallyxlings installwith.xlings.jsonworkspace triggers shim creation🤖 Generated with Claude Code