[F] Fix UTF8 encoding error

This commit is contained in:
Azalea Gui
2023-02-25 10:54:18 -05:00
parent d9ac9c9031
commit 78a7b2d1bb
+2 -1
View File
@@ -19,7 +19,8 @@ pub fn run_cmd(cmd: &str) -> Result<Output> {
if !out.status.success() {
error!("Command failed: {cmd}");
error!("Command output: {:?}", out);
bail!(String::from_utf8(out.stderr)?);
let msg = String::from_utf8_lossy(&out.stderr.to_owned()).to_string();
bail!(msg);
}
// debug!("Command output: {:?}", out);
Ok(out)