Skip to content

Commit

Permalink
Rollup merge of rust-lang#39312 - mgattozzi:rustdoc-help-fix, r=alexc…
Browse files Browse the repository at this point in the history
…richton

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 rust-lang#39310
  • Loading branch information
frewsxcv authored Feb 5, 2017
2 parents 76e9ea7 + bb34856 commit 5cfd5ed
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 5cfd5ed

Please sign in to comment.