Repository navigation
fix(doctor): skip Windows-only checks on non-Windows platforms - #242
Merged
Merged
Conversation
winuxcmd core, command links and bash/sh shims are the Windows command layer; on Linux/macOS they can never be found, so doctor reported '1/3 critical checks passed' and implied a broken install. - gate those checks behind a Platform enum (compile-time cfg!(windows), injected value in tests) and report them as n/a rows outside the critical tally on unix - name the platform in the header line - terminal row falls back to TERM instead of WT_SESSION on unix - bundled-tools row reads n/a (Windows release layout) instead of implying an empty install when the winuxcmd tree is absent Linux behavior is verified by the repo CI Linux jobs; local validation covered the unchanged Windows report (3/3 critical checks passed).
This was referenced Oct 10, 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.
Closes #194.
What
niu doctorprobed the Windows command layer (winuxcmd core, command links, bash/sh shims) on every platform. On Linux those probes can never succeed, so the report ended with a false1/3 critical checks passedimplying a broken install.Changes (crates/niubash-runtime/src/doctor.rs)
Platformenum (Windows/Unix), resolved at compile time viacfg!(windows)but branched as an injected value so the skip logic is unit-tested on any host OS.n/a on this platform — Windows component, skippedinfo rows and are excluded from the critical tally (Linux: 1 critical check = startup rc).niubash doctor — x.y.z (windows|unix).TERMon unix instead of the Windows-onlyWT_SESSION.n/a — bundled tools ship in the Windows release layoutinstead of implying nothing is installed; on Windows the row is unchanged.Testing
niu doctoroutput unchanged (3/3 critical checks passed, same rows; header gains(windows)).plugins::distrostest failures (offline git clone in sandbox) reproduce on a clean checkout of master; unrelated.