Skip to content

fix(windows): fix URL handling when opening browser - #5119

Merged
rami3l merged 1 commit into
rust-lang:mainfrom
rami3l:fix/win-browser-open
Sep 29, 2026
Merged

rami3l merged 1 commit into
rust-lang:mainfrom
rami3l:fix/win-browser-open

Conversation

@rami3l

@rami3l rami3l commented Sep 29, 2026

Copy link
Copy Markdown
Member

Closes #5035 by:

Many thanks to @ChrisDenton for investigating into this issue and @Seeker14491 for making the upstream fix!

cc @SnipUndercover if you want to do another round of testing with the two commands below:

> rustup doc --rustdoc
> rustup doc --rustdoc lints::broken_intra_doc_links

@rami3l
rami3l requested a review from ChrisDenton September 29, 2026 14:07
@rami3l
rami3l marked this pull request as ready for review September 29, 2026 14:07
@SnipUndercover

Copy link
Copy Markdown

Checked out af4c8c2 and can confirm that the issue is resolved.

Running rustup with $env:BROWSER set and unset both result in successfully opening a new browser tab with the correct link.
Tried with the following commands:

cargo run-rustup -- doc --book
cargo run-rustup -- doc --rustdoc
cargo run-rustup -- doc --rustdoc lints::broken_intra_doc_links

cd target\debug
$env:RUSTUP_FORCE_ARG0="rustup"
./rustup-init doc --book
./rustup-init doc --rustdoc
./rustup-init doc --rustdoc lints::broken_intra_doc_links

Happy to see this fixed!

@ChrisDenton ChrisDenton left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been testing across a few different environments and it seems to work fine for me. So looks good to me!

View changes since this review

@rami3l
rami3l added this pull request to the merge queue Sep 29, 2026
Merged via the queue into rust-lang:main with commit a49e374 Sep 29, 2026
28 checks passed
@rami3l
rami3l deleted the fix/win-browser-open branch September 29, 2026 17:44
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.

(Windows) "The system cannot find the file specified. (os error 2)" when running rustup doc in a non-ANSI path

4 participants