mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-20 18:56:17 +00:00
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:
1 parent
073276696f
commit
71d584dd6e
2 files changed
+3
-6
No files matched your search
@@ -40,7 +40,6 @@ itertools = "0.14"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
|
||||
regex = "1.12"
|
||||
once_cell = "1.21"
|
||||
num = "0.4.3"
|
||||
sha1 = "0.10"
|
||||
sha3 = "0.10"
|
||||
|
||||
@@ -70,7 +70,7 @@ impl Process for NativeProcess {
|
||||
let mut command = Command::new(executable.as_path());
|
||||
command.stdin(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(path);
|
||||
|
||||
@@ -92,10 +92,9 @@ impl Process for NativeProcess {
|
||||
|
||||
if result.status.code() != Some(EXIT_CODE_SUCCESS) {
|
||||
let message = format!(
|
||||
"{executable:?} subprocess failed with exit code {:?}:\n{}\n{}",
|
||||
"{executable:?} subprocess failed with exit code {:?}:\n{}",
|
||||
result.status.code(),
|
||||
String::from_utf8_lossy(result.stdout.as_slice()),
|
||||
String::from_utf8_lossy(result.stderr.as_slice()),
|
||||
);
|
||||
return Err(SolcStandardJsonOutputError::new_error(
|
||||
message,
|
||||
@@ -108,9 +107,8 @@ impl Process for NativeProcess {
|
||||
Ok(output) => output,
|
||||
Err(error) => {
|
||||
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.stderr.as_slice()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user