Skip to content

Commit

Permalink
node/utils/test-genesis: handle panic in invalid templates
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Sep 24, 2024
1 parent 21e2c4e commit ba57011
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/node/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ pub fn test_genesis(args: TestGenesis, global_args: args::Global) {
check_can_sign,
} = args;

let templates = genesis::templates::load_and_validate(&path).unwrap();
let Some(templates) = genesis::templates::load_and_validate(&path) else {
eprintln!("Unable to load the genesis templates");
cli::safe_exit(1);
};
let genesis = genesis::chain::finalize(
templates,
FromStr::from_str("namada-dryrun").unwrap(),
Expand Down

0 comments on commit ba57011

Please sign in to comment.