Repository navigation
Report mv errors for a missing destination directory - #1275
Open
Hashim1999164 wants to merge 2 commits into
Open
Hashim1999164 wants to merge 2 commits into
Hashim1999164 wants to merge 2 commits into
Conversation
Trailing slash destinations that do not exist now surface a clear error for files while directory renames keep working.
nfischer
reviewed
Oct 3, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1275 +/- ##
==========================================
- Coverage 97.17% 97.12% -0.05%
==========================================
Files 36 36
Lines 1520 1530 +10
==========================================
+ Hits 1477 1486 +9
- Misses 43 44 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Match bash mv wording when the destination path ends with a slash but is not a directory.
Contributor
Author
|
yep, swapped it to Not a directory to match bash. thanks for the catch |
nfischer
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
mvtargets a path that ends with a directory separator but that directory does not exist, file moves now set stderr instead of failing silently. Directory renames to a new name with a trailing separator still behave the same.Fixes #1146
Test plan
npx ava test/mv.jsshell.mv("file", "no/such/dir/")leaves the file in place and prints an error