fix: improve error handling for application handle retrieval (#3860)

* fix: improve error handling for application handle retrieval

* fix: correct argument passing for command execution and improve URL stripping logic
This commit is contained in:
Tunglies
2025-06-22 01:16:57 +08:00
committed by GitHub
parent 41fc13cfe2
commit 3d8b2cf35f
3 changed files with 17 additions and 14 deletions

View File

@@ -530,9 +530,9 @@ impl EventDrivenProxyManager {
use tauri_plugin_shell::ShellExt;
let app_handle = match Handle::global().app_handle() {
Ok(handle) => handle,
Err(e) => {
log::error!(target: "app", "获取应用句柄失败: {}", e);
Some(handle) => handle,
None => {
log::error!(target: "app", "获取应用句柄失败");
return;
}
};