diff --git a/src/commands/add/mod.rs b/src/commands/add/mod.rs index f2800cc9..736f8762 100644 --- a/src/commands/add/mod.rs +++ b/src/commands/add/mod.rs @@ -11,10 +11,10 @@ use console::style; pub(crate) struct AddArgs { #[command(subcommand)] commands: AddCommands, - #[arg(global = true, short, long)] + #[arg(global = true, short, long = "runtime")] /// Runtime path; for example: `sub0/runtime/src/lib.rs` /// Runtime cargo manifest path will be inferred as `(parent of lib.rs)/Cargo.toml` - pub(crate) runtime: Option, + pub(crate) runtime_path: Option, } #[derive(Subcommand)] #[command(subcommand_required = true)] @@ -43,7 +43,7 @@ pub(crate) struct FrameArgs { impl AddArgs { pub(crate) fn execute(&self) -> anyhow::Result<()> { match self.commands { - AddCommands::Pallet(ref cmd) => cmd.clone().execute(&self.runtime), + AddCommands::Pallet(ref cmd) => cmd.clone().execute(&self.runtime_path), } } } diff --git a/src/engines/pallet_engine/template.rs b/src/engines/pallet_engine/template.rs index 4891697c..a10a7cb9 100644 --- a/src/engines/pallet_engine/template.rs +++ b/src/engines/pallet_engine/template.rs @@ -4,7 +4,6 @@ use crate::{ }; use std::{fs, path::PathBuf}; -// use super::{pallet_entry::AddPalletEntry, PalletEngine}; pub fn create_pallet_template( path: Option,