Skip to content

Commit bacb877

Browse files
author
Clément Turmel
committed
feature(client-cli): add print of the version at each command execution
1 parent 5f041dd commit bacb877

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

mithril-client-cli/src/main.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@ pub struct Args {
9090

9191
impl Args {
9292
pub async fn execute(&self, root_logger: Logger) -> MithrilResult<()> {
93-
debug!(
94-
root_logger,
95-
"Mithril client CLI version: {}",
96-
env!("CARGO_PKG_VERSION")
97-
);
93+
let version_message = format!("Mithril Client CLI version: {}", env!("CARGO_PKG_VERSION"));
94+
eprintln!("{version_message}");
95+
debug!(root_logger, "{version_message}");
9896
debug!(root_logger, "Run Mode: {}", self.run_mode);
9997
let filename = format!("{}/{}.json", self.config_directory.display(), self.run_mode);
10098
debug!(root_logger, "Reading configuration file '{filename}'.");

0 commit comments

Comments
 (0)