Better error message for mv when file not found (#8586)

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
   ╰────
```
This commit is contained in:
Reilly Wood
2023-03-23 11:31:49 -07:00
committed by GitHub
parent 35798ce0cc
commit 5c2a767987
2 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ fn errors_if_source_doesnt_exist() {
cwd: dirs.test(),
"mv non-existing-file test_folder/"
);
assert!(actual.err.contains("invalid file or pattern"));
assert!(actual.err.contains("File(s) not found"));
})
}