diff --git a/src/main.rs b/src/main.rs index c7f3f32..879ef3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use std::path::Path; -use clap::Parser; +use clap::{IntoApp, Parser}; use flopha::cli::{Cli, Commands}; use flopha::service::{last_version, next_version}; @@ -14,10 +14,12 @@ fn main() { Some(Commands::NextVersion(args)) => { next_version(path, args); } - None => {} - } - - if cli.version { - println!("{}", env!("CARGO_PKG_VERSION")); + None => { + if cli.version { + println!("{}", env!("CARGO_PKG_VERSION")); + } else { + Cli::command().print_help().unwrap(); + } + } } }