diff --git a/.changes/shell-execute.md b/.changes/shell-execute.md new file mode 100644 index 0000000000..39a862f69b --- /dev/null +++ b/.changes/shell-execute.md @@ -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. diff --git a/plugins/shell/src/commands.rs b/plugins/shell/src/commands.rs index 77aee69985..6a010f6647 100644 --- a/plugins/shell/src/commands.rs +++ b/plugins/shell/src/commands.rs @@ -187,7 +187,7 @@ pub struct ChildProcessReturn { #[allow(clippy::too_many_arguments)] #[tauri::command] -pub fn execute( +pub async fn execute( window: Window, program: String, args: ExecuteArgs,