forked from extern/nushell
Communicates unsupported feature the case where directories are found in globs whether we cp or mv
This commit is contained in:
parent
75e3c6f547
commit
cbf6eed2d7
@ -240,8 +240,8 @@ pub fn cp(args: CommandArgs, registry: &CommandRegistry) -> Result<OutputStream,
|
|||||||
if destination.exists() {
|
if destination.exists() {
|
||||||
if !sources.iter().all(|x| (x.as_ref().unwrap()).is_file()) {
|
if !sources.iter().all(|x| (x.as_ref().unwrap()).is_file()) {
|
||||||
return Err(ShellError::labeled_error(
|
return Err(ShellError::labeled_error(
|
||||||
"Copy aborted (directories found).",
|
"Copy aborted (directories found). Recursive copying in patterns not supported yet (try copying the directory directly)",
|
||||||
"Copy aborted (directories found).",
|
"Copy aborted (directories found). Recursive copying in patterns not supported yet (try copying the directory directly)",
|
||||||
args.nth(0).unwrap().span(),
|
args.nth(0).unwrap().span(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -225,8 +225,8 @@ pub fn mv(args: CommandArgs, registry: &CommandRegistry) -> Result<OutputStream,
|
|||||||
if destination.exists() {
|
if destination.exists() {
|
||||||
if !sources.iter().all(|x| (x.as_ref().unwrap()).is_file()) {
|
if !sources.iter().all(|x| (x.as_ref().unwrap()).is_file()) {
|
||||||
return Err(ShellError::labeled_error(
|
return Err(ShellError::labeled_error(
|
||||||
"Rename aborted (directories found).",
|
"Rename aborted (directories found). Renaming in patterns not supported yet (try moving the directory directly)",
|
||||||
"Rename aborted (directories found).",
|
"Rename aborted (directories found). Renaming in patterns not supported yet (try moving the directory directly)",
|
||||||
args.nth(0).unwrap().span(),
|
args.nth(0).unwrap().span(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user