Open ghost opened 2 years ago
Getting a similar issue when an entry in mimeapps.list
doesn't have a string on the right-hand side of the =
.
$ handlr get x-scheme-handler/matrix
thread 'main' panicked at src/apps/user.rs:12:65:
called `Result::unwrap()` on an `Err` value: ParseApps(Error { variant: ParsingError { positives: [value_char], negatives: [] }, location: Pos(121), line_col: Pos((5, 12)), path: None, line: "audio/mpeg=␊", continued_line: None })
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: core::ops::function::FnOnce::call_once
4: once_cell::imp::OnceCell<T>::initialize::{{closure}}
5: once_cell::imp::initialize_inner
6: once_cell::imp::OnceCell<T>::initialize
7: handlr::main
This was on NixOS where my user ~/.config/mimeapps.list
had some entries lines with no app on the right hand side of the association. Removing the empty entries fixed this for me.
Not sure if lines without the assignment argument are valid in the mimetypes.list
spec, but handlr
should probably report the malformed file & line number instead of panic.
Thanks for this excellent piece of software.
Version: 0.6.4
When my mimeapps.list doesn't end with a newline I get this panic:
When I add a newline, there is no issue.
I think handlr should throw an error here or ignore it.