-
Notifications
You must be signed in to change notification settings - Fork 2.1k
mv should error when attempting to move folders into itself #13082
Copy link
Copy link
Closed
Labels
A:coreutils-uutilsChanges relating to coreutils/uutilsChanges relating to coreutils/uutilsA:error-silent-failCases where nothing or something bad happens and an error would be helpful and expectedCases where nothing or something bad happens and an error would be helpful and expectedA:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:bugSomething isn't workingSomething isn't workingcategory:upstreamproblem with upstream dependencyproblem with upstream dependency
Milestone
Description
Describe the bug
mv will happily execute the following, and not return any error of it being unexpected or nonsensical. This can end up with confusing results where the folder just disappears.
How to reproduce
mkdir a
mv a a/aExpected behavior
Something similar to zsh:
mkdir a
mv a a/a
mv: rename a to a/a: Invalid argumentScreenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.93.0 |
| major | 0 |
| minor | 93 |
| patch | 0 |
| branch | |
| commit_hash | |
| build_os | macos-aarch64 |
| build_target | aarch64-apple-darwin |
| rust_version | rustc 1.77.2 (25ef9e3d8 2024-04-09) (built from a source tarball) |
| cargo_version | cargo 1.77.1 |
| build_time | 1980-01-01 00:00:00 +00:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | default, sqlite, system-clipboard, trash, which |
| installed_plugins | polars |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:coreutils-uutilsChanges relating to coreutils/uutilsChanges relating to coreutils/uutilsA:error-silent-failCases where nothing or something bad happens and an error would be helpful and expectedCases where nothing or something bad happens and an error would be helpful and expectedA:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemcategory:bugSomething isn't workingSomething isn't workingcategory:upstreamproblem with upstream dependencyproblem with upstream dependency