fix(shell): use serde untagged not flatten (#1328)

This commit is contained in:
Amr Bashir
2024-05-21 20:10:36 +03:00
committed by GitHub
parent db45dfaab3
commit cb0a788d17
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"shell": "patch"
---
Fix a regression introduce in the last release where The JS API `Command.execute()` returned malformed response.
+1 -2
View File
@@ -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,
}