Repository navigation
Add print-only url to rustup doc, fix #1288 - #1324
amar-laksh wants to merge 4 commits into
Conversation
Mark-Simulacrum
left a comment
There was a problem hiding this comment.
I think there's also a .swp. file and another file 3 that snuck into the PR on accident; could you remove those?
| if m.is_present("print-only") { | ||
| let path = toolchain.doc_path(doc_url); | ||
| match path { | ||
| Ok(v) => return Ok(println!("file:/{}", v.to_str().unwrap())), |
There was a problem hiding this comment.
This probably wants to be v.display().
There was a problem hiding this comment.
Cleared the extra files, BTW v.display() for some reason doesn't provide the exact URL. So didn't change that part. Thanks.
|
☔ The latest upstream changes (presumably #1390) made this pull request unmergeable. Please resolve the merge conflicts. |
| if m.is_present("print-only") { | ||
| let path = toolchain.doc_path(doc_url); | ||
| match path { | ||
| Ok(v) => return Ok(println!("file:/{}", v.to_str().unwrap())), |
There was a problem hiding this comment.
This will produce a URL like file:/C:\Foo\bar on windows, or possibly something even stranger, can you update this to work on windows, and also add a test for this command.
There was a problem hiding this comment.
Sure, I'll try to work it out.
There was a problem hiding this comment.
BTW, shouldn't the URL be just the URL with no platform-specific prefixes?
I mean just the 'C:\Foo\bar' or whatever the platform-specific URL is. @Diggsey ?
There was a problem hiding this comment.
That is probably fine - at least on windows the browser is smart enough to turn a path into a file:/// URL.
Sorry for the earlier one, this is the complete commit.