Skip to content

Commit dd8b8a4

Browse files
committed
docs(tauri): clarify script serialization in execute function
- Added a comment in the `execute` function to explain that TypeScript sends scripts as-is, necessitating serialization for proper handling. - This change enhances understanding of the script processing logic, ensuring clarity on the serialization step for arguments passed to the function.
1 parent 1b6b4be commit dd8b8a4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/tauri-plugin/src/commands.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub(crate) async fn execute<R: Runtime>(
6060
let tx = Arc::new(Mutex::new(Some(tx)));
6161

6262
// Build the script with args if offered
63+
// Note: TypeScript sends scripts as-is (not JSON.stringify'd), so we serialize here
6364
let script = if !request.args.is_empty() {
6465
let args_json = serde_json::to_string(&request.args)
6566
.map_err(|e| crate::Error::SerializationError(format!("Failed to serialize args: {}", e)))?;

0 commit comments

Comments
 (0)