Skip to content

Commit

Permalink
chore: updating help and version commands display
Browse files Browse the repository at this point in the history
  • Loading branch information
MatisseB committed Feb 27, 2025
1 parent d3fb4c9 commit d92598f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/lgc/src/lgc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async fn main() {
}

const HELP_TEMPLATE: &str = r#"
{before-help}{about} {version}
{before-help}{name} {version}
{usage-heading} {usage}
Expand All @@ -28,7 +28,11 @@ const HELP_TEMPLATE: &str = r#"

/// LogCraft CLI
#[derive(clap::Parser)]
#[clap(name="LogCraft", help_template=HELP_TEMPLATE, version=clap::crate_version!())]
#[clap(
name="LogCraft CLI",
help_template=HELP_TEMPLATE,
version=concat!("v", env!("CARGO_PKG_VERSION")
))]
struct LogCraftCli {
#[clap(subcommand)]
commands: LogCraftCommands,
Expand Down Expand Up @@ -119,7 +123,9 @@ impl LogCraftCli {
}
};
} else {
tracing::error!("no configuration file, run 'lgc init' to initialize a new project");
tracing::error!(
"no configuration file, run 'lgc init' to initialize a new project"
);
std::process::exit(1)
}
}
Expand Down

0 comments on commit d92598f

Please sign in to comment.