mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 15:13:01 +01:00
update uutils crates (#14371)
# Description This PR updates the uutils/coreutils crates to the latest version. I hard-coded debug to false, a new uu_mv parameter. It may be interesting to add that but I just wanted to get all the uu crates on the same version. I had to update the tests because --no-clobber works but doesn't say anything when it's not clobbering and previously we were checking for an error message. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. -->
This commit is contained in:
parent
f63f8cb154
commit
13ce9e4f64
34
Cargo.lock
generated
34
Cargo.lock
generated
@ -6709,9 +6709,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uu_cp"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6fb99d355ccb02e8c514e4a1d93e4aa4eedea9837de24635dfd24c165971444e"
|
||||
checksum = "e0eff79f5eacf6bb88c9afc19f3cec2ab14ad31317be1369100658b46d41e410"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"filetime",
|
||||
@ -6725,9 +6725,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_mkdir"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "219588fbc146f18188781208ac4034616c51cf151677b4e1f9caf63ca8a7f2cf"
|
||||
checksum = "feba7cf875eecbb746b1c5a5a8a031ab3a00e5f44f5441643a06b78577780d3a"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"uucore",
|
||||
@ -6735,9 +6735,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_mktemp"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1e79ad2c5911908fce23a6069c52ca82e1997e2ed4bf6abf2d867c79c3dc73f"
|
||||
checksum = "1a9cfd389f60e667c5ee6659beaad50bada7e710d76082c7d77ab91e04307c8f"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"rand",
|
||||
@ -6747,9 +6747,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_mv"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd57c8d02f8a99ed56ed9f6fddab403ee0e2bf9e8f3a5ca8f0f9e4d6e3e392a0"
|
||||
checksum = "bf932231fccdf108f75443bab0ce17acfe49b5825d731b8a358251833be7da20"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"fs_extra",
|
||||
@ -6773,9 +6773,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_uname"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ad1ca90f9b292bccaad0de70e6feccac5182c6713a5e1ca72d97bf3555b608b4"
|
||||
checksum = "182b4071a2e6f7288cbbc1b1ff05c74e9dc7527b4735583d9e3cd92802b06910"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"platform-info",
|
||||
@ -6784,27 +6784,27 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_whoami"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc7c52e42e0425710461700adc1063f468f2ba8a8ff83ee69ba661095ab7b77a"
|
||||
checksum = "5d15200414428c65f95d0b1d1226fc84f74ae80376bfe59959d93ddf57f944f5"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"libc",
|
||||
"uucore",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uucore"
|
||||
version = "0.0.27"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b54aad02cf7e96f5fafabb6b836efa73eef934783b17530095a29ffd4fdc154"
|
||||
checksum = "04ea43050c46912575654c5181f4135529e8d4003fca80803af10cdef3ca6412"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"dunce",
|
||||
"glob",
|
||||
"libc",
|
||||
"nix 0.28.0",
|
||||
"nix 0.29.0",
|
||||
"number_prefix",
|
||||
"once_cell",
|
||||
"os_display",
|
||||
@ -6812,7 +6812,7 @@ dependencies = [
|
||||
"walkdir",
|
||||
"wild",
|
||||
"winapi-util",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.59.0",
|
||||
"xattr",
|
||||
]
|
||||
|
||||
|
14
Cargo.toml
14
Cargo.toml
@ -165,14 +165,14 @@ unicode-segmentation = "1.12"
|
||||
unicode-width = "0.1"
|
||||
ureq = { version = "2.10", default-features = false }
|
||||
url = "2.2"
|
||||
uu_cp = "0.0.27"
|
||||
uu_mkdir = "0.0.27"
|
||||
uu_mktemp = "0.0.27"
|
||||
uu_mv = "0.0.27"
|
||||
uu_cp = "0.0.28"
|
||||
uu_mkdir = "0.0.28"
|
||||
uu_mktemp = "0.0.28"
|
||||
uu_mv = "0.0.28"
|
||||
uu_touch = "0.0.28"
|
||||
uu_whoami = "0.0.27"
|
||||
uu_uname = "0.0.27"
|
||||
uucore = "0.0.27"
|
||||
uu_whoami = "0.0.28"
|
||||
uu_uname = "0.0.28"
|
||||
uucore = "0.0.28"
|
||||
uuid = "1.11.0"
|
||||
v_htmlescape = "0.15.0"
|
||||
wax = "0.6"
|
||||
|
@ -188,6 +188,7 @@ impl Command for UMv {
|
||||
target_dir: None,
|
||||
no_target_dir: false,
|
||||
strip_slashes: false,
|
||||
debug: false,
|
||||
};
|
||||
if let Err(error) = uu_mv::mv(&files, &options) {
|
||||
return Err(ShellError::GenericError {
|
||||
|
@ -513,13 +513,18 @@ fn test_mv_no_clobber() {
|
||||
sandbox.with_files(&[EmptyFile(file_a)]);
|
||||
sandbox.with_files(&[EmptyFile(file_b)]);
|
||||
|
||||
let actual = nu!(
|
||||
let _ = nu!(
|
||||
cwd: dirs.test(),
|
||||
"mv -n {} {}",
|
||||
file_a,
|
||||
file_b,
|
||||
);
|
||||
assert!(actual.err.contains("not replacing"));
|
||||
|
||||
let file_count = nu!(
|
||||
cwd: dirs.test(),
|
||||
"ls test_mv* | length | to nuon"
|
||||
);
|
||||
assert_eq!(file_count.out, "2");
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -841,14 +841,13 @@ fn test_cp_arg_no_clobber() {
|
||||
let target = dirs.fixtures.join("cp").join(TEST_HOW_ARE_YOU_SOURCE);
|
||||
let target_hash = get_file_hash(target.display());
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.root(),
|
||||
"cp {} {} --no-clobber",
|
||||
src.display(),
|
||||
target.display()
|
||||
let _ = nu!(
|
||||
cwd: dirs.root(),
|
||||
"cp {} {} --no-clobber",
|
||||
src.display(),
|
||||
target.display()
|
||||
);
|
||||
let after_cp_hash = get_file_hash(target.display());
|
||||
assert!(actual.err.contains("not replacing"));
|
||||
// Check content was not clobbered
|
||||
assert_eq!(after_cp_hash, target_hash);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user