diff --git a/src-tauri/src/cmds.rs b/src-tauri/src/cmds.rs index 1ea6355231e7c48673dcaa76313dd531f26cf84d..1f3e7467c531dd60d4b329e53afcff87734e11cd 100644 --- a/src-tauri/src/cmds.rs +++ b/src-tauri/src/cmds.rs @@ -348,24 +348,26 @@ fn open_path_cmd(path: PathBuf, err_str: &str) -> Result<(), String> { match result { Ok(child) => match child.wait_with_output() { Ok(out) => { + // 退出ç ä¸ä¸º0 ä¸ä¸€å®šæ²¡æœ‰è°ƒç”¨æˆåŠŸ + // å› æ¤ä»…åšwarn log且ä¸è¿”回错误 if let Some(code) = out.status.code() { if code != 0 { - log::error!( - "failed to open path {:?} for {} (code {code})", - &path, + log::warn!("failed to open {:?} (code {})", &path, code); + log::warn!( + "open cmd stdout: {}, stderr: {}", + String::from_utf8_lossy(&out.stdout), String::from_utf8_lossy(&out.stderr), ); - return Err(err_str.into()); } } } Err(err) => { - log::error!("failed to open path {:?} for {err}", &path); + log::error!("failed to open {:?} for {err}", &path); return Err(err_str.into()); } }, Err(err) => { - log::error!("failed to open path {:?} for {err}", &path); + log::error!("failed to open {:?} for {err}", &path); return Err(err_str.into()); } }