diff --git a/crates/nu-command/src/commands/mkdir.rs b/crates/nu-command/src/commands/mkdir.rs index 55770f62a..d1db44b7a 100644 --- a/crates/nu-command/src/commands/mkdir.rs +++ b/crates/nu-command/src/commands/mkdir.rs @@ -22,7 +22,7 @@ impl WholeStreamCommand for Mkdir { "Make directories, creates intermediary directories as required." } - fn run_with_actions(&self, args: CommandArgs) -> Result { + fn run(&self, args: CommandArgs) -> Result { mkdir(args) } @@ -35,7 +35,7 @@ impl WholeStreamCommand for Mkdir { } } -fn mkdir(args: CommandArgs) -> Result { +fn mkdir(args: CommandArgs) -> Result { let name = args.call_info.name_tag.clone(); let shell_manager = args.shell_manager(); diff --git a/crates/nu-engine/src/filesystem/filesystem_shell.rs b/crates/nu-engine/src/filesystem/filesystem_shell.rs index 705e1da5a..3f1d0a1bd 100644 --- a/crates/nu-engine/src/filesystem/filesystem_shell.rs +++ b/crates/nu-engine/src/filesystem/filesystem_shell.rs @@ -479,7 +479,7 @@ impl Shell for FilesystemShell { }: MkdirArgs, name: Tag, path: &str, - ) -> Result { + ) -> Result { let path = Path::new(path); let mut stream = VecDeque::new(); @@ -504,7 +504,7 @@ impl Shell for FilesystemShell { } if show_created_paths { let val = format!("{:}", create_at.to_string_lossy()).into(); - stream.push_back(Ok(ReturnSuccess::Value(val))); + stream.push_back(val); } } diff --git a/crates/nu-engine/src/shell/mod.rs b/crates/nu-engine/src/shell/mod.rs index d19189cfc..98c11c77d 100644 --- a/crates/nu-engine/src/shell/mod.rs +++ b/crates/nu-engine/src/shell/mod.rs @@ -29,7 +29,7 @@ pub trait Shell: std::fmt::Debug { ) -> Result; fn cd(&self, args: CdArgs, name: Tag) -> Result; fn cp(&self, args: CopyArgs, name: Tag, path: &str) -> Result; - fn mkdir(&self, args: MkdirArgs, name: Tag, path: &str) -> Result; + fn mkdir(&self, args: MkdirArgs, name: Tag, path: &str) -> Result; fn mv(&self, args: MvArgs, name: Tag, path: &str) -> Result; fn rm(&self, args: RemoveArgs, name: Tag, path: &str) -> Result; fn path(&self) -> String; diff --git a/crates/nu-engine/src/shell/shell_manager.rs b/crates/nu-engine/src/shell/shell_manager.rs index 7511f194a..d985f1833 100644 --- a/crates/nu-engine/src/shell/shell_manager.rs +++ b/crates/nu-engine/src/shell/shell_manager.rs @@ -172,7 +172,7 @@ impl ShellManager { shells[self.current_shell()].rm(args, name, &path) } - pub fn mkdir(&self, args: MkdirArgs, name: Tag) -> Result { + pub fn mkdir(&self, args: MkdirArgs, name: Tag) -> Result { let shells = self.shells.lock(); let path = shells[self.current_shell()].path(); diff --git a/crates/nu-engine/src/shell/value_shell.rs b/crates/nu-engine/src/shell/value_shell.rs index 81e95fec0..af5c65cc6 100644 --- a/crates/nu-engine/src/shell/value_shell.rs +++ b/crates/nu-engine/src/shell/value_shell.rs @@ -197,7 +197,7 @@ impl Shell for ValueShell { )) } - fn mkdir(&self, _args: MkdirArgs, name: Tag, _path: &str) -> Result { + fn mkdir(&self, _args: MkdirArgs, name: Tag, _path: &str) -> Result { Err(ShellError::labeled_error( "mkdir not currently supported on values", "not currently supported",