mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 23:01:01 +00:00
Check precompiled subprocess exit status
This commit is contained in:
@@ -48,6 +48,14 @@ fn derive(select: u8, input: TokenStream) -> TokenStream {
|
|||||||
buf.clear();
|
buf.clear();
|
||||||
stdout.read_to_end(&mut buf).unwrap();
|
stdout.read_to_end(&mut buf).unwrap();
|
||||||
|
|
||||||
|
let success = match child.wait() {
|
||||||
|
Ok(exit_status) => exit_status.success(),
|
||||||
|
Err(_) => !buf.is_empty(),
|
||||||
|
};
|
||||||
|
if !success {
|
||||||
|
panic!();
|
||||||
|
}
|
||||||
|
|
||||||
let mut buf = InputBuffer::new(&buf);
|
let mut buf = InputBuffer::new(&buf);
|
||||||
memory.receive(&mut buf)
|
memory.receive(&mut buf)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user