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

closes #1361
pull/1363/head
Amr Bashir 1 year ago committed by GitHub
parent cfb3d74d9f
commit aff47992b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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.

@ -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,

Loading…
Cancel
Save