Conversation
Member
|
Would be better to handle unix and windows the same. |
tianrking
force-pushed
the
fix/optional-renderer-path-errors
branch
2 times, most recently
from
September 8, 2026 16:25
e322957 to
915ae72
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Author
|
@GuillaumeGomez I updated this in 915ae72 to use the same optional-command preflight on Unix and Windows.
The branch has been rebased onto current |
GuillaumeGomez
requested changes
Sep 9, 2026
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
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.
Fixes #3170.
Problem
A missing optional renderer or preprocessor can still fail a build when the
platform reports command lookup differently from
ErrorKind::NotFound, or whenthe child exits before mdBook writes its JSON input. This regressed the expected
optional = truebehavior on Linux.Change
them, so the optional-command decision is not dependent on child-process timing.
paths and relative
PATHentries.PATHentry with no usable command as absent,while direct command paths and existing/non-executable files still go through
spawnso their real errors are retained.std::process::Command's documented bare-command search:the executable directory, system directory, Windows directory, then
PATH;an omitted
.exeextension is also considered.(
runandsupports).Regression coverage
PATHentry is skipped on Unix.missing.
.exeis notmisclassified as missing.
Validation
Local Windows validation with Rust 1.88.0:
cargo test --workspace --lockedcargo test --workspace --no-default-features --lockedcargo test -p mdbook-drivercargo test --test testsuite missing_optional -- --nocapturecargo clippy -p mdbook-driver --all-targets --no-deps -- -D warningscargo clippy -p mdbook-driver --all-targets --no-default-features --no-deps -- -D warningscargo fmt --all -- --checkgit diff --check