diff --git a/src/commands/mkdir.rs b/src/commands/mkdir.rs index 56fec8777..668b2111a 100644 --- a/src/commands/mkdir.rs +++ b/src/commands/mkdir.rs @@ -35,6 +35,8 @@ fn mkdir( args: MkdirArgs, context: &RunnablePerItemContext, ) -> Result, ShellError> { + println!("shell clone"); let shell_manager = context.shell_manager.clone(); + println!("mkdir"); shell_manager.mkdir(args, context) } diff --git a/src/shell/filesystem_shell.rs b/src/shell/filesystem_shell.rs index b3b05f682..732b07743 100644 --- a/src/shell/filesystem_shell.rs +++ b/src/shell/filesystem_shell.rs @@ -476,13 +476,14 @@ impl Shell for FilesystemShell { fn mkdir( &self, - MkdirArgs { rest: directories }: MkdirArgs, + mkdir_args: MkdirArgs, RunnablePerItemContext { name, shell_manager, .. }: &RunnablePerItemContext, ) -> Result, ShellError> { + println!("full path"); let full_path = PathBuf::from(shell_manager.path()); if directories.len() == 0 { @@ -493,13 +494,17 @@ impl Shell for FilesystemShell { )); } + println!("dirs"); for dir in directories.iter() { + println!("create at:"); let create_at = { let mut loc = full_path.clone(); loc.push(&dir.item); loc }; + println!("{:?}", create_at); + match std::fs::create_dir_all(create_at) { Err(reason) => { return Err(ShellError::labeled_error( @@ -508,10 +513,15 @@ impl Shell for FilesystemShell { dir.span(), )) } - Ok(_) => {} + Ok(_) => { + println!("OK"); + } } + println!("End loop"); } + println!("Done"); + Ok(VecDeque::new()) }