Skip to content

feat: emit NonFatalError on Windows if PATHEXT not populated - #125

Merged
Xaeroxe merged 1 commit into
harryfei:masterfrom
Xaeroxe:add-path-ext-error
Jun 16, 2026
Merged

Xaeroxe merged 1 commit into
harryfei:masterfrom
Xaeroxe:add-path-ext-error

Conversation

@Xaeroxe

@Xaeroxe Xaeroxe commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes #123

If this situation is detected, which will now send a NonFatalError::PathExtNotPopulated to the user provided nonfatal_error_handler. This makes it possible to detect and warn about this situation.

@chawyehsu

Copy link
Copy Markdown

I believe this addresses the need to identify and handle errors caused by a missing PATHEXT. While it requires downstream users to use which-rs in a more verbose way without introducing new APIs or breaking existing ones, that seems like a reasonable tradeoff.

Apart from docstrings I couldn't find documentation for the nonfatal handler. It might be helpful to add some standard examples to the docs.

Thanks for your work on this.

@Xaeroxe
Xaeroxe merged commit c9df5ef into harryfei:master Jun 16, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Would it be a viable idea for PATHEXT to fall back to its default value?

2 participants