Skip to content

Commit 13ce66d

Browse files
committed
Fix --version not showing the version
1 parent d9eecfc commit 13ce66d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/command/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn run() -> Result<(), Error> {
4949

5050
let matches = options.parse(&args[1..])?;
5151

52-
if matches.opt_present("h") || matches.free.is_empty() {
52+
if matches.opt_present("h") {
5353
usage!(&options, USAGE);
5454
return Ok(());
5555
}
@@ -59,6 +59,11 @@ pub fn run() -> Result<(), Error> {
5959
return Ok(());
6060
}
6161

62+
if matches.free.is_empty() {
63+
usage!(&options, USAGE);
64+
return Ok(());
65+
}
66+
6267
// We create all necessary directories here so we don't have to do this
6368
// every time some piece of code needs these to exist.
6469
create_dir_all(cache_directory()?)?;

0 commit comments

Comments
 (0)