mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
fix(shell): use serde untagged not flatten (#1328)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"shell": "patch"
|
||||
---
|
||||
|
||||
Fix a regression introduce in the last release where The JS API `Command.execute()` returned malformed response.
|
||||
@@ -170,6 +170,7 @@ fn prepare_cmd<R: Runtime>(
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(untagged)]
|
||||
enum Output {
|
||||
String(String),
|
||||
Raw(Vec<u8>),
|
||||
@@ -179,9 +180,7 @@ enum Output {
|
||||
pub struct ChildProcessReturn {
|
||||
code: Option<i32>,
|
||||
signal: Option<i32>,
|
||||
#[serde(flatten)]
|
||||
stdout: Output,
|
||||
#[serde(flatten)]
|
||||
stderr: Output,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user