Skip to content

Commit

Permalink
chore: log version on new line
Browse files Browse the repository at this point in the history
test: fix mismatch type error
  • Loading branch information
CinematicCow committed Mar 30, 2024
1 parent efdc824 commit 22f8116
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/commands/new/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use clap::{Args, Parser};
use std::{fs, path::Path};
use strum_macros::{Display, EnumString};

use cliclack::{clear_screen, confirm, intro, outro, outro_cancel, set_theme};
use cliclack::{clear_screen, confirm, intro, outro, outro_cancel, set_theme,log};

#[derive(Clone, Parser, Debug, Display, EnumString, PartialEq)]
pub enum Template {
Expand Down Expand Up @@ -63,7 +63,7 @@ impl NewParachainCommand {
"Cannot generate parachain until \"{}\" directory is removed.",
destination_path.display()
))?;
return Ok(());
return Ok(())
}
fs::remove_dir_all(destination_path)?;
}
Expand All @@ -83,7 +83,8 @@ impl NewParachainCommand {
outro_cancel("git signature could not be found. Please configure your git config with your name and email")?;
}
}
spinner.stop(format!("Generation complete using {}", tag));
spinner.stop("Generation complete");
log::info(format!("Version: {}", tag))?;
outro(format!("cd into \"{}\" and enjoy hacking! 🚀", &self.name))?;
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/engines/parachain_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ mod tests {
decimals: 18,
initial_endowment: "1000000".to_string(),
};
let result: anyhow::Result<()> = instantiate_base_template(temp_dir.path(), config);
let result: anyhow::Result<String> = instantiate_base_template(temp_dir.path(), config);
assert!(result.is_ok());
Ok(temp_dir)
}
Expand Down

0 comments on commit 22f8116

Please sign in to comment.