-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ShellExecute to open docs on windows #499
Comments
Interesting. On Windows 10 ( With my default set to either nightly or stable, What do you have set in "Default Apps by Protocol"? (Settings -> System -> Default Apps -> Choose default apps by protocol) |
@peschkaj I'd assume this would only happen if you don't have a default browser set? Otherwise that is strange. If you run, for example, |
I would've assumed that I was being prompted because I didn't have a default browser set, too, but this has been my daily driver system since October of last year, so I'm really confused why this particular action bothered to prompt me. 😕 I wonder if you're running into something blocking you on from being on the Insider Preview. |
I couldn't duplicate this on |
I just hit this, also running a Windows 10 insider build (14342). I wouldn't be surprised if this is a Windows bug. If I open cmd.exe:
|
@luser Interesting. I've submitted it to the insider hub, lets hope they actually see it. feedback-hub:?contextid=268&feedbackid=b2091da1-3e92-4c8e-bd5c-fadae6f29412&form=1&src=2 Edit: Interestingly, that feedback-hub link also does not work with the |
There must be a smarter way to open the web browser than running cmd.exe. |
I believe |
Let's re-purpose this issue for the |
rustup doc --book
fails on Windows
I don't see |
This is no longer an issue in W10 build 15063 AKA Creator's Update. I assume that this isn't specific to insider builds (considering that 15063 was an insider build before general availability). It might still be a good idea to use ShellExecute. We don't necessarily need winapi to use ShellExecute. It's a pretty simple API. We'd just need one extern function, one constant, and make sure that the types of LPCSTR, etc. are correct.
|
That is a great point. This code worked in one of my projects.
oops, did not see your edit. |
Closes rust-lang#499 The implementation is not too complicated, so it's a bit better than spawning a cmd.exe just to open docs. It also should fix opening docs for the few people still using a year-old insider preview build.
Use ShellExecute rather than start.exe to open docs on windows Closes #499 The implementation is not too complicated, so it's a bit better than spawning a cmd.exe just to open docs. It also should fix opening docs for the few people still using a year-old insider preview build.
rustup 0.1.12 (c6e430a 2016-05-12)
Windows 10 x64 Insider Preview build 14342
Running any of the
doc
subcommands opens a new command prompt, but does not display the docs. I've tested this from cmd.exe, powershell.exe, and the MSYS2 shell.Let me know if you need any other info to help debug this issue.
Edit:
I've tried running the command as found in https://github.com/rust-lang-nursery/rustup.rs/blob/master/src/rustup-utils/src/raw.rs#L542, which works fine.
cmd /C start https://github.com
The text was updated successfully, but these errors were encountered: