feat: Return 1 if no dirs are found

A better error code
This commit is contained in:
andy.boot
2025-07-28 22:44:23 +01:00
parent 3cce61f854
commit 901bc3895a
2 changed files with 18 additions and 12 deletions
+3 -1
View File
@@ -107,7 +107,9 @@ pub fn test_ignore_all_in_file() {
#[test]
pub fn test_with_bad_param() {
let mut cmd = Command::cargo_bin("dust").unwrap();
let result = cmd.arg("bad_place").unwrap();
cmd.arg("-P").arg("bad_place");
let output_error = cmd.unwrap_err();
let result = output_error.as_output().unwrap();
let stderr = str::from_utf8(&result.stderr).unwrap();
assert!(stderr.contains("No such file or directory"));
}