Repository navigation
fix(aliases): route shutdown helpers safely on WSL - #515
Merged
Merged
Conversation
Preserve native Linux/macOS commands, reject ambiguous platform signals, and validate Windows delays before conversion. Add isolated Bash/Zsh regression coverage and CI wiring without executing real power-control commands. Closes #514 Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.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
Make the Bash/Zsh shutdown helpers target the Windows host inside WSL while preserving ordinary native Linux/macOS command arguments. Detect WSL from Linux kernel evidence, not environment variables or executable presence alone. Conflicting/failed detection returns an error without an operation; Windows interop failures never fall back to native shutdown.
Changes
sdn,tsdn, andcancel_tsdn.Test plan
git diff --checkpassed.3334fc32d6eed2e5c72147ce1bc348794b959e5a: Validate Setup Script (6/6), E2E Install Smoke Test (4/4).Local Zsh and ShellCheck were unpacked into ignored tooling storage, not installed globally. A local Zsh adapter supplies its unpacked module path; hosted CI uses the OS-installed shells directly.
The harness extracts the actual helper definitions unchanged, clears inherited inputs, uses a fixture-only PATH and recording stubs, and never forwards
sudoarguments. Missing-executable tests cannot resolve a real Windows shutdown executable. No real shutdown or cancellation command was executed. Tests simulate WSL/OS behavior rather than proving live power-control semantics. The existing live alias override and home symlink are unchanged.Related
Closes #514
Hygiene and approval boundary
developat6fb62d7; PR targetsdevelop.Implementation is authorized through a reviewed, CI-validated PR only. Do not merge or replace live aliases without separate user approval. No maintainer/GitHub approval is implied by the independent local source review.