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
1 changed files with 1 additions and 1 deletions

View File

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