diff --git a/src/uu/ls/src/ls.rs b/src/uu/ls/src/ls.rs index 41d2f59b1..935741959 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -183,7 +183,7 @@ impl UError for LsError { Self::BlockSizeParseError(_) => 1, Self::ConflictingArgumentDired() => 1, Self::AlreadyListedError(_) => 2, - Self::TimeStyleParseError(_, _) => 1, + Self::TimeStyleParseError(_, _) => 2, } } } diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 15893b0e2..18deb1551 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -1737,7 +1737,12 @@ fn test_ls_styles() { .stdout_matches(&re_custom_format); // Also fails due to not having full clap support for time_styles - scene.ucmd().arg("-l").arg("-time-style=invalid").fails(); + scene + .ucmd() + .arg("-l") + .arg("--time-style=invalid") + .fails() + .code_is(2); //Overwrite options tests scene