File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
crates/compilers/src/compilers/vyper Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use foundry_compilers_core::error::{Result, SolcError};
77use semver:: Version ;
88use serde:: { de:: DeserializeOwned , Serialize } ;
99use std:: {
10+ io:: { self , Write } ,
1011 path:: { Path , PathBuf } ,
1112 process:: { Command , Stdio } ,
1213 str:: FromStr ,
@@ -152,8 +153,11 @@ impl Vyper {
152153 let mut child = cmd. spawn ( ) . map_err ( self . map_io_err ( ) ) ?;
153154 debug ! ( "spawned" ) ;
154155
155- let stdin = child. stdin . as_mut ( ) . unwrap ( ) ;
156- serde_json:: to_writer ( stdin, input) ?;
156+ {
157+ let mut stdin = io:: BufWriter :: new ( child. stdin . take ( ) . unwrap ( ) ) ;
158+ serde_json:: to_writer ( & mut stdin, input) ?;
159+ stdin. flush ( ) . map_err ( self . map_io_err ( ) ) ?;
160+ }
157161 debug ! ( "wrote JSON input to stdin" ) ;
158162
159163 let output = child. wait_with_output ( ) . map_err ( self . map_io_err ( ) ) ?;
You can’t perform that action at this time.
0 commit comments