refactor: convert async functions to synchronous for UWP tool invocation
This commit is contained in:
@@ -6,8 +6,8 @@ mod platform {
|
||||
use super::CmdResult;
|
||||
use crate::{core::win_uwp, wrap_err};
|
||||
|
||||
pub async fn invoke_uwp_tool() -> CmdResult {
|
||||
wrap_err!(win_uwp::invoke_uwptools().await)
|
||||
pub fn invoke_uwp_tool() -> CmdResult {
|
||||
wrap_err!(win_uwp::invoke_uwptools())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,5 +24,5 @@ mod platform {
|
||||
/// Command exposed to Tauri
|
||||
#[tauri::command]
|
||||
pub async fn invoke_uwp_tool() -> CmdResult {
|
||||
platform::invoke_uwp_tool().await
|
||||
platform::invoke_uwp_tool()
|
||||
}
|
||||
|
||||
@@ -520,6 +520,7 @@ impl EventDrivenProxyManager {
|
||||
{
|
||||
logging_error!(
|
||||
Type::System,
|
||||
"{}",
|
||||
Self::execute_sysproxy_command(&["pac", expected_url])
|
||||
);
|
||||
}
|
||||
@@ -536,6 +537,7 @@ impl EventDrivenProxyManager {
|
||||
let address = format!("{}:{}", expected.host, expected.port);
|
||||
logging_error!(
|
||||
Type::System,
|
||||
"{}",
|
||||
Self::execute_sysproxy_command(&["global", &address, &expected.bypass])
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use deelevate::{PrivilegeLevel, Token};
|
||||
use runas::Command as RunasCommand;
|
||||
use std::process::Command as StdCommand;
|
||||
|
||||
pub async fn invoke_uwptools() -> Result<()> {
|
||||
pub fn invoke_uwptools() -> Result<()> {
|
||||
let resource_dir = dirs::app_resources_dir()?;
|
||||
let tool_path = resource_dir.join("enableLoopback.exe");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user