Skip to content
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

ls panicked #5371

Closed
sanpii opened this issue Oct 7, 2023 · 4 comments · Fixed by #5372
Closed

ls panicked #5371

sanpii opened this issue Oct 7, 2023 · 4 comments · Fixed by #5372

Comments

@sanpii
Copy link
Contributor

sanpii commented Oct 7, 2023

$ ls
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/uu/ls/src/ls.rs:2819:87
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This error appears when I execute ls in a directory where files are rapidly created then deleted.

$ ls -V
uu-ls 0.0.21
@sylvestre
Copy link
Contributor

fun, which version of ls do you have?

(does not seem to be trunk https:/uutils/coreutils/blob/main/src/uu/ls/src/ls.rs#L2819 )

@sanpii
Copy link
Contributor Author

sanpii commented Oct 7, 2023

@sylvestre I just update my first message with my version.

https:/uutils/coreutils/blob/main/src/uu/ls/src/ls.rs#L2891

@sylvestre
Copy link
Contributor

ok, thanks

} else if file_type.is_file() && file_is_executable(path.md(out).as_ref().unwrap()) {

we should probably not have an unwrap here and handle the error

sanpii added a commit to sanpii/coreutils that referenced this issue Oct 7, 2023
@sanpii
Copy link
Contributor Author

sanpii commented Oct 7, 2023

If I understand, it’s just cosmetic. I created a PR to ignore this error.

sanpii added a commit to sanpii/coreutils that referenced this issue Oct 7, 2023
sanpii added a commit to sanpii/coreutils that referenced this issue Oct 7, 2023
sanpii added a commit to sanpii/coreutils that referenced this issue Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants