mirror of
https://github.com/nushell/nushell.git
synced 2024-11-08 09:34:30 +01:00
parent
6f0dd8e885
commit
d60d71a697
@ -22,7 +22,7 @@ impl WholeStreamCommand for Mkdir {
|
||||
"Make directories, creates intermediary directories as required."
|
||||
}
|
||||
|
||||
fn run_with_actions(&self, args: CommandArgs) -> Result<ActionStream, ShellError> {
|
||||
fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||
mkdir(args)
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ impl WholeStreamCommand for Mkdir {
|
||||
}
|
||||
}
|
||||
|
||||
fn mkdir(args: CommandArgs) -> Result<ActionStream, ShellError> {
|
||||
fn mkdir(args: CommandArgs) -> Result<OutputStream, ShellError> {
|
||||
let name = args.call_info.name_tag.clone();
|
||||
let shell_manager = args.shell_manager();
|
||||
|
||||
|
@ -479,7 +479,7 @@ impl Shell for FilesystemShell {
|
||||
}: MkdirArgs,
|
||||
name: Tag,
|
||||
path: &str,
|
||||
) -> Result<ActionStream, ShellError> {
|
||||
) -> Result<OutputStream, ShellError> {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ pub trait Shell: std::fmt::Debug {
|
||||
) -> Result<ActionStream, ShellError>;
|
||||
fn cd(&self, args: CdArgs, name: Tag) -> Result<ActionStream, ShellError>;
|
||||
fn cp(&self, args: CopyArgs, name: Tag, path: &str) -> Result<ActionStream, ShellError>;
|
||||
fn mkdir(&self, args: MkdirArgs, name: Tag, path: &str) -> Result<ActionStream, ShellError>;
|
||||
fn mkdir(&self, args: MkdirArgs, name: Tag, path: &str) -> Result<OutputStream, ShellError>;
|
||||
fn mv(&self, args: MvArgs, name: Tag, path: &str) -> Result<ActionStream, ShellError>;
|
||||
fn rm(&self, args: RemoveArgs, name: Tag, path: &str) -> Result<ActionStream, ShellError>;
|
||||
fn path(&self) -> String;
|
||||
|
@ -172,7 +172,7 @@ impl ShellManager {
|
||||
shells[self.current_shell()].rm(args, name, &path)
|
||||
}
|
||||
|
||||
pub fn mkdir(&self, args: MkdirArgs, name: Tag) -> Result<ActionStream, ShellError> {
|
||||
pub fn mkdir(&self, args: MkdirArgs, name: Tag) -> Result<OutputStream, ShellError> {
|
||||
let shells = self.shells.lock();
|
||||
|
||||
let path = shells[self.current_shell()].path();
|
||||
|
@ -197,7 +197,7 @@ impl Shell for ValueShell {
|
||||
))
|
||||
}
|
||||
|
||||
fn mkdir(&self, _args: MkdirArgs, name: Tag, _path: &str) -> Result<ActionStream, ShellError> {
|
||||
fn mkdir(&self, _args: MkdirArgs, name: Tag, _path: &str) -> Result<OutputStream, ShellError> {
|
||||
Err(ShellError::labeled_error(
|
||||
"mkdir not currently supported on values",
|
||||
"not currently supported",
|
||||
|
Loading…
Reference in New Issue
Block a user