coreutils
coreutils copied to clipboard
more handle errors with multiple files
added handling for case mentioned in (#4906) and added some tests as well. But i have to say i stumbled upon something i need to ask about: is there a reason the more function returns an error with an exit code? cause when i compare:
~/Desktop/coreutils/target/debug$ ./coreutils more nonexistent_file
more: cannot open 'nonexistent_file': No such file or directory
~/Desktop/coreutils/target/debug$ echo $?
1
~/Desktop/coreutils/target/debug$ more nonexistent_file
more: cannot open nonexistent_file: No such file or directory
~/Desktop/coreutils/target/debug$ echo $?
0
is that an issue or smth that that doesn't need to be changed? i tried to keep it this way but if multiple files are given it will always return no error. is this okay? or how should more handle one file failing and one working?
GNU testsuite comparison:
Skipping an intermittent issue tests/tail-2/inotify-dir-recreate
my terminal currently gives me the broken output i associate with the raw mode not being disabled. but i cant seem to find where the program could exit without disabling it first. and every test case i tried doesnt replicate the terminal not disabling the raw mode. that cargo test doesnt seem to execute the tests in a predictable order doesnt help with finding the case that leaves the terminal in raw mode... any keywords/ideas on how i can find the reason for that?
GNU testsuite comparison:
Skip an intermittent issue tests/tail/inotify-dir-recreate