ls: Add NotADirectory message#11341
Conversation
|
We also need a French translation in |
|
i can take care of the french translation |
|
GNU testsuite comparison: |
f445acd to
790634f
Compare
Added: #[test]
#[cfg(unix)]
fn test_ls_not_a_directory_errors() {
let scene = TestScenario::new(util_name!());
scene
.ucmd()
.arg("/etc/hosts/test")
.fails()
.code_is(2)
.stderr_contains("not a directory");
} |
Same bug. However, the advantages of my PR are:
However, I don't care if my PR gets closed and the other gets merged because I'm used to the 1st point, and I don't program on the platforms in the 2nd point. |
|
GNU testsuite comparison: |
|
Better message is one of at aim of this project. But, "A path component was" would add |
|
The message is coming from OS. Different might cause other issue at different command. |
|
Closing as I don't know how complex is "sed hack for GnuTests in the future." |
it is trivial. |
This makes the error message for
ls ~/.bashrc/testless scary. Two people had already complained about the phrasing "unknown io error".Before
Some say the error message is scarier than the GNU coreutils one.
After
I got rid of the word "unknown". I changed the phrasing, because Peter Cordes said "it hasn't checked which path component isn't a directory; it's not the final one".