Update code after merge
This commit is contained in:
parent
38f4c7c17a
commit
617bfb8759
93
Cargo.lock
generated
93
Cargo.lock
generated
|
@ -2708,18 +2708,6 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
|
||||
dependencies = [
|
||||
"bitflags 2.4.2",
|
||||
"cfg-if",
|
||||
"cfg_aliases",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
|
@ -6389,7 +6377,7 @@ dependencies = [
|
|||
"indicatif",
|
||||
"libc",
|
||||
"quick-error 2.0.1",
|
||||
"uucore 0.0.26",
|
||||
"uucore 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir",
|
||||
"xattr",
|
||||
]
|
||||
|
@ -6401,7 +6389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "040aa4584036b2f65e05387b0ea9ac468afce1db325743ce5f350689fd9ce4ae"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"uucore 0.0.26",
|
||||
"uucore 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -6413,7 +6401,7 @@ dependencies = [
|
|||
"clap",
|
||||
"rand",
|
||||
"tempfile",
|
||||
"uucore 0.0.26",
|
||||
"uucore 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -6425,7 +6413,7 @@ dependencies = [
|
|||
"clap",
|
||||
"fs_extra",
|
||||
"indicatif",
|
||||
"uucore 0.0.26",
|
||||
"uucore 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -6440,6 +6428,17 @@ dependencies = [
|
|||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uu_uname"
|
||||
version = "0.0.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5951832d73199636bde6c0d61cf960932b3c4450142c290375bc10c7abed6db5"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"platform-info",
|
||||
"uucore 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uu_whoami"
|
||||
version = "0.0.25"
|
||||
|
@ -6448,7 +6447,7 @@ checksum = "e3b44166eb6335aeac42744ea368cc4c32d3f2287a4ff765a5ce44d927ab8bb4"
|
|||
dependencies = [
|
||||
"clap",
|
||||
"libc",
|
||||
"uucore 0.0.26",
|
||||
"uucore 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
|
@ -6464,7 +6463,22 @@ dependencies = [
|
|||
"nix",
|
||||
"once_cell",
|
||||
"os_display",
|
||||
"uucore_procs",
|
||||
"uucore_procs 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wild",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uucore"
|
||||
version = "0.0.26"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"glob",
|
||||
"libc",
|
||||
"nix",
|
||||
"number_prefix",
|
||||
"once_cell",
|
||||
"os_display",
|
||||
"uucore_procs 0.0.26",
|
||||
"wild",
|
||||
]
|
||||
|
||||
|
@ -6482,7 +6496,7 @@ dependencies = [
|
|||
"number_prefix",
|
||||
"once_cell",
|
||||
"os_display",
|
||||
"uucore_procs 0.0.24",
|
||||
"uucore_procs 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"walkdir",
|
||||
"wild",
|
||||
"winapi-util",
|
||||
|
@ -6490,32 +6504,6 @@ dependencies = [
|
|||
"xattr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uucore"
|
||||
version = "0.0.26"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"glob",
|
||||
"libc",
|
||||
"nix 0.28.0",
|
||||
"number_prefix",
|
||||
"once_cell",
|
||||
"os_display",
|
||||
"uucore_procs 0.0.26",
|
||||
"wild",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uucore_procs"
|
||||
version = "0.0.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a233a488da42f3ddb0aaa8a9f75a969e3f37e4de7e909d2d23f6aa3ee401d20"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"uuhelp_parser 0.0.24",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uucore_procs"
|
||||
version = "0.0.26"
|
||||
|
@ -6526,15 +6514,26 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "uuhelp_parser"
|
||||
name = "uucore_procs"
|
||||
version = "0.0.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "425a23c7b7145bc7620c9c445817c37b1f78b6790aee9f208133f3c028975b60"
|
||||
checksum = "1a233a488da42f3ddb0aaa8a9f75a969e3f37e4de7e909d2d23f6aa3ee401d20"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"uuhelp_parser 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uuhelp_parser"
|
||||
version = "0.0.26"
|
||||
|
||||
[[package]]
|
||||
name = "uuhelp_parser"
|
||||
version = "0.0.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "425a23c7b7145bc7620c9c445817c37b1f78b6790aee9f208133f3c028975b60"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.8.0"
|
||||
|
|
|
@ -163,6 +163,7 @@ uu_cp = "0.0.25"
|
|||
uu_mkdir = "0.0.25"
|
||||
uu_mktemp = "0.0.25"
|
||||
uu_mv = "0.0.25"
|
||||
uu_touch = { path = "../coreutils/src/uu/touch" }
|
||||
uu_whoami = "0.0.25"
|
||||
uu_uname = "0.0.25"
|
||||
uucore = "0.0.25"
|
||||
|
|
|
@ -172,7 +172,10 @@ impl Command for UTouch {
|
|||
let span = reference_span.expect("utouch was given a reference file");
|
||||
if io_err.kind() == ErrorKind::NotFound {
|
||||
// todo merge main into this to say which file not found
|
||||
ShellError::FileNotFound { span }
|
||||
ShellError::FileNotFound {
|
||||
span,
|
||||
file: reference_path.display().to_string(),
|
||||
}
|
||||
} else {
|
||||
io_to_nu_err(
|
||||
io_err,
|
||||
|
@ -232,15 +235,11 @@ impl Command for UTouch {
|
|||
}
|
||||
|
||||
fn io_to_nu_err(err: std::io::Error, msg: String, span: Span) -> ShellError {
|
||||
if err.kind() == ErrorKind::PermissionDenied {
|
||||
ShellError::PermissionDeniedError { msg, span }
|
||||
} else {
|
||||
ShellError::GenericError {
|
||||
error: err.to_string(),
|
||||
msg,
|
||||
span: Some(span),
|
||||
help: None,
|
||||
inner: Vec::new(),
|
||||
}
|
||||
ShellError::GenericError {
|
||||
error: err.to_string(),
|
||||
msg,
|
||||
span: Some(span),
|
||||
help: None,
|
||||
inner: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user