inhert stderr for recursive process (#485)

Allows for debug logs. The stdout stay piped as its used for
intra-process communication.

Signed-off-by: xermicus <bigcyrill@hotmail.com>
This commit is contained in:
xermicus authored and GitHub committed 2026-02-22 18:57:20 +01:00
1 parent 073276696f
commit 71d584dd6e
2 files changed
+3 -6

No files matched your search

-1
View File
@@ -40,7 +40,6 @@ itertools = "0.14"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["arbitrary_precision"] } serde_json = { version = "1.0", features = ["arbitrary_precision"] }
regex = "1.12" regex = "1.12"
once_cell = "1.21"
num = "0.4.3" num = "0.4.3"
sha1 = "0.10" sha1 = "0.10"
sha3 = "0.10" sha3 = "0.10"
+3 -5
View File
@@ -70,7 +70,7 @@ impl Process for NativeProcess {
let mut command = Command::new(executable.as_path()); let mut command = Command::new(executable.as_path());
command.stdin(std::process::Stdio::piped()); command.stdin(std::process::Stdio::piped());
command.stdout(std::process::Stdio::piped()); command.stdout(std::process::Stdio::piped());
command.stderr(std::process::Stdio::piped()); command.stderr(std::process::Stdio::inherit());
command.arg("--recursive-process"); command.arg("--recursive-process");
command.arg(path); command.arg(path);
@@ -92,10 +92,9 @@ impl Process for NativeProcess {
if result.status.code() != Some(EXIT_CODE_SUCCESS) { if result.status.code() != Some(EXIT_CODE_SUCCESS) {
let message = format!( let message = format!(
"{executable:?} subprocess failed with exit code {:?}:\n{}\n{}", "{executable:?} subprocess failed with exit code {:?}:\n{}",
result.status.code(), result.status.code(),
String::from_utf8_lossy(result.stdout.as_slice()), String::from_utf8_lossy(result.stdout.as_slice()),
String::from_utf8_lossy(result.stderr.as_slice()),
); );
return Err(SolcStandardJsonOutputError::new_error( return Err(SolcStandardJsonOutputError::new_error(
message, message,
@@ -108,9 +107,8 @@ impl Process for NativeProcess {
Ok(output) => output, Ok(output) => output,
Err(error) => { Err(error) => {
panic!( panic!(
"{executable:?} subprocess stdout parsing error: {error:?}\n{}\n{}", "{executable:?} subprocess stdout parsing error: {error:?}\n{}",
String::from_utf8_lossy(result.stdout.as_slice()), String::from_utf8_lossy(result.stdout.as_slice()),
String::from_utf8_lossy(result.stderr.as_slice()),
); );
} }
} }