1
Fork 0

Fix full path being output with rustdoc -h

rustdoc would output the full path to the binary when calling it with
the `-h` or `--help` flags. This is undesired behavior. It has been
replaced with a hardcoded string `rustdoc` to fix the issue.

Fixes #39310
This commit is contained in:
Michael Gattozzi 2017-01-26 01:35:00 -05:00
parent 6991938d3e
commit bb34856e9d
No known key found for this signature in database
GPG key ID: 16E2FE8B38672F66

View file

@ -193,7 +193,7 @@ pub fn main_args(args: &[String]) -> isize {
nightly_options::check_nightly_options(&matches, &opts()); nightly_options::check_nightly_options(&matches, &opts());
if matches.opt_present("h") || matches.opt_present("help") { if matches.opt_present("h") || matches.opt_present("help") {
usage(&args[0]); usage("rustdoc");
return 0; return 0;
} else if matches.opt_present("version") { } else if matches.opt_present("version") {
rustc_driver::version("rustdoc", &matches); rustc_driver::version("rustdoc", &matches);