Skip to content

Better error message for mv when file not found#8586

Merged
rgwood merged 1 commit intonushell:mainfrom
rgwood:better-mv-error-message
Mar 23, 2023
Merged

Better error message for mv when file not found#8586
rgwood merged 1 commit intonushell:mainfrom
rgwood:better-mv-error-message

Conversation

@rgwood
Copy link
Copy Markdown
Contributor

@rgwood rgwood commented Mar 23, 2023

Closes #8546.

Before:

> mv foo.txt bar.txt
Error:
  × Invalid file or pattern
   ╭─[entry #2:1:1]
 1 │ mv foo.txt bar.txt
   ·    ───┬───
   ·       ╰── invalid file or pattern
   ╰────

After:

> mv foo.txt bar.txt
Error:
  × File(s) not found
   ╭─[entry #2:1:1]
 1 │ mv foo.txt bar.txt
   ·    ───┬───
   ·       ╰── could not find any files matching this glob pattern
   ╰────

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2023

Codecov Report

Merging #8586 (9a9258c) into main (66ad83c) will increase coverage by 0.36%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8586      +/-   ##
==========================================
+ Coverage   68.14%   68.50%   +0.36%     
==========================================
  Files         624      624              
  Lines      100670   100672       +2     
==========================================
+ Hits        68601    68969     +368     
+ Misses      32069    31703     -366     
Impacted Files Coverage Δ
crates/nu-command/src/filesystem/mv.rs 81.35% <100.00%> (ø)

... and 3 files with indirect coverage changes

@rgwood rgwood merged commit 5c2a767 into nushell:main Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide better error output when file doesn't exist

1 participant