fix(shell): make execute command async (#1362)

closes #1361
This commit is contained in:
Amr Bashir
2024-05-23 02:16:39 +03:00
committed by GitHub
parent cfb3d74d9f
commit aff47992b3
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"shell": "patch"
---
Run `Command.execute()` JS api, asynchronously in the Rust side to avoid blocking main thread and causing the webview to freeze.
+1 -1
View File
@@ -186,7 +186,7 @@ pub struct ChildProcessReturn {
#[allow(clippy::too_many_arguments)]
#[tauri::command]
pub fn execute<R: Runtime>(
pub async fn execute<R: Runtime>(
window: Window<R>,
program: String,
args: ExecuteArgs,