mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 06:26:55 +00:00
Merge pull request #629 from sfackler/usage
Use argv[0] for usage output
This commit is contained in:
commit
7eabbeb424
@ -164,7 +164,7 @@ fn main() {
|
||||
fn print_usage(opts: &Options, reason: &str) {
|
||||
let reason = format!("{}\nusage: {} [options] <file>...",
|
||||
reason,
|
||||
env::current_exe().unwrap().display());
|
||||
env::args_os().next().unwrap().to_string_lossy());
|
||||
println!("{}", opts.usage(&reason));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user