Skip to content

Commit

Permalink
Fix --version not showing the version
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickpeterse committed Oct 7, 2020
1 parent d9eecfc commit 13ce66d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/command/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn run() -> Result<(), Error> {

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

if matches.opt_present("h") || matches.free.is_empty() {
if matches.opt_present("h") {
usage!(&options, USAGE);
return Ok(());
}
Expand All @@ -59,6 +59,11 @@ pub fn run() -> Result<(), Error> {
return Ok(());
}

if matches.free.is_empty() {
usage!(&options, USAGE);
return Ok(());
}

// We create all necessary directories here so we don't have to do this
// every time some piece of code needs these to exist.
create_dir_all(cache_directory()?)?;
Expand Down

0 comments on commit 13ce66d

Please sign in to comment.