Skip to content

Commit

Permalink
chore: use native error messages from command output
Browse files Browse the repository at this point in the history
  • Loading branch information
Integral-Tech committed Jan 11, 2025
1 parent 3c1a713 commit 4353c8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/kernel/lkm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ impl KernelModules<'_> {
self.current_info.stylize_data(
Box::leak(
util::exec_cmd("modinfo", &[&self.current_name])
.unwrap_or_else(|e| format!("module information not available: {e}"))
.unwrap_or_else(|e| {
format!("module information not available: {e}")
})
.replace("signature: ", "signature: \n")
.into_boxed_str(),
),
Expand Down

0 comments on commit 4353c8a

Please sign in to comment.