File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ pub(crate) struct AddArgs {
1111 /// Pallet to add to the runtime
1212 pub ( crate ) pallet : AddPallet ,
1313 #[ arg( global = true , short, long) ]
14- /// Runtime path;
14+ /// Runtime path; for example: `sub0/runtime/src/lib.rs`
1515 /// Cargo Manifest path will be inferred as `../Cargo.toml`
1616 pub ( crate ) runtime : Option < String > ,
1717}
@@ -37,9 +37,8 @@ impl AddArgs {
3737 let runtime_path = match self . runtime {
3838 Some ( ref s) => {
3939 let path = PathBuf :: from ( s) ;
40- // println!("Using runtime path: {}", &path.display());
4140 if !path. exists ( ) {
42- anyhow:: bail!( "Runtime path does not exist : {}" , path. display( ) ) ;
41+ anyhow:: bail!( "Invalid runtime path : {}" , path. display( ) ) ;
4342 }
4443 path
4544 }
Original file line number Diff line number Diff line change @@ -30,12 +30,6 @@ pub(super) enum Steps {
3030 /// PalletEngine State transitions
3131 SwitchTo ( State ) ,
3232}
33-
34- macro_rules! steps {
35- ( $cmd: expr) => {
36- steps. push( $cmd) ;
37- } ;
38- }
3933/// Some rules to follow when constructing steps:
4034/// The pallet engine state expects to go as edits would, i.e. top to bottom lexically
4135/// So it makes sense for any given file, to first include an import, then items that refer to it
@@ -47,6 +41,7 @@ pub(super) fn step_builder(pallet: AddPallet) -> Result<Vec<Steps>> {
4741 AddPallet :: Template => {
4842 // steps.push(RuntimePalletDependency(Dependency::runtime_template()));
4943 steps. push ( RuntimePalletImport ( quote ! (
44+ // Imports by pop-cli
5045 pub use pallet_parachain_template;
5146 ) ) ) ;
5247 steps. push ( SwitchTo ( State :: Config ) ) ;
You can’t perform that action at this time.
0 commit comments