-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(#4886) more: panics if file is not readable #4888
Conversation
Thanks for your PR :) I wouldn't use a And can you please add a test to |
:) Sure! If I understand correctly i only need to add a file into the fixtures folder (in the correct sub folder) to be able to use it? i did so and changed it to the 244 perms and now every test panics...
i get that comes from recursive copy where it returns an error since it is not allowed to copy. |
You won't need fixtures in this case. And a Unix solution is fine. For inspiration you might want to have a look at the tests for |
Changed to USimpleError and added a test case. my quick research and my dad say the echo is missing/not happening. |
please replace the screenshot by text: it is terrible for search and accessibility |
should i add a "skip test on not unix" inside my newly added test? |
GNU testsuite comparison:
|
On windows, fails with:
|
You forgot to disable "raw mode" before returning the error :)
Yes, please, otherwise the CICD will fail when running it on Windows. You probably also have to use |
Co-authored-by: Daniel Hofstetter <[email protected]>
Ah yes I missed that :) thank you! |
Thanks :) |
fix for #4886 (comment)
i just changed the unwrap for the File::open to a match and i hope it actually is a UUsageError i am supposed to return here. I chose UsageError since the code above mine chose UsageError for a similar case
output of the preinstalled more on my linux:
more: cannot open foo: Permission denied
output of this more:
./more: cannot open 'foo': permission denied Try './more --help' for more information.