Skip to content

Commit 71d584d

Browse files
authored
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>
1 parent 0732766 commit 71d584d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ itertools = "0.14"
4040
serde = { version = "1.0", features = ["derive"] }
4141
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
4242
regex = "1.12"
43-
once_cell = "1.21"
4443
num = "0.4.3"
4544
sha1 = "0.10"
4645
sha3 = "0.10"

crates/resolc/src/process/native_process.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl Process for NativeProcess {
7070
let mut command = Command::new(executable.as_path());
7171
command.stdin(std::process::Stdio::piped());
7272
command.stdout(std::process::Stdio::piped());
73-
command.stderr(std::process::Stdio::piped());
73+
command.stderr(std::process::Stdio::inherit());
7474
command.arg("--recursive-process");
7575
command.arg(path);
7676

@@ -92,10 +92,9 @@ impl Process for NativeProcess {
9292

9393
if result.status.code() != Some(EXIT_CODE_SUCCESS) {
9494
let message = format!(
95-
"{executable:?} subprocess failed with exit code {:?}:\n{}\n{}",
95+
"{executable:?} subprocess failed with exit code {:?}:\n{}",
9696
result.status.code(),
9797
String::from_utf8_lossy(result.stdout.as_slice()),
98-
String::from_utf8_lossy(result.stderr.as_slice()),
9998
);
10099
return Err(SolcStandardJsonOutputError::new_error(
101100
message,
@@ -108,9 +107,8 @@ impl Process for NativeProcess {
108107
Ok(output) => output,
109108
Err(error) => {
110109
panic!(
111-
"{executable:?} subprocess stdout parsing error: {error:?}\n{}\n{}",
110+
"{executable:?} subprocess stdout parsing error: {error:?}\n{}",
112111
String::from_utf8_lossy(result.stdout.as_slice()),
113-
String::from_utf8_lossy(result.stderr.as_slice()),
114112
);
115113
}
116114
}

0 commit comments

Comments
 (0)