Skip to content

fix(parser): return error instead of panicking on non-UTF-8 --time-style value#1848

Open
salarkhannn wants to merge 1 commit into
eza-community:mainfrom
salarkhannn:fix/non-utf8-time-style-panic
Open

fix(parser): return error instead of panicking on non-UTF-8 --time-style value#1848
salarkhannn wants to merge 1 commit into
eza-community:mainfrom
salarkhannn:fix/non-utf8-time-style-panic

Conversation

@salarkhannn

Copy link
Copy Markdown

Closes #1837

…yle value

Replaces the unwrap() in TimeFormatParser::parse_ref with a proper
clap InvalidUtf8 error, so a non-UTF-8 argument like
--time-style "\xff\xfe" exits with code 2 instead of 134.

Fixes eza-community#1837
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 this pull request may close these issues.

bug: eza panics on a non-UTF-8 --time-style value (to_str().unwrap())

1 participant