Skip to content

Commit

Permalink
Fix full path being output with rustdoc -h
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mgattozzi committed Jan 26, 2017
1 parent 6991938 commit bb34856
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bb34856

Please sign in to comment.