mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 15:25:06 +02:00
Send only absolute paths to uu_mv (#11576)
# Description Fixes: #11127 It's something similar to #11080, applying the same logic to `uu_mv`. # User-Facing Changes # After Submitting
This commit is contained in:
@ -136,6 +136,15 @@ impl Command for UMv {
|
||||
}
|
||||
files.append(&mut app_vals);
|
||||
}
|
||||
|
||||
// Make sure to send absolute paths to avoid uu_cp looking for cwd in std::env which is not
|
||||
// supported in Nushell
|
||||
for src in files.iter_mut() {
|
||||
if !src.is_absolute() {
|
||||
*src = nu_path::expand_path_with(&src, &cwd);
|
||||
}
|
||||
}
|
||||
|
||||
// Add back the target after globbing
|
||||
let spanned_target = paths.last().ok_or(ShellError::NushellFailedSpanned {
|
||||
msg: "Missing file operand".into(),
|
||||
|
Reference in New Issue
Block a user