mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 15:44:27 +03:00
hgmain: explicitly flush IO on exit
Summary: Without this, `hg status --print0` can output nothing and break tests. Reviewed By: xavierd Differential Revision: D19387317 fbshipit-source-id: 4feb82889df9bd1705526027f491db90a2a5f946
This commit is contained in:
parent
c262d1d647
commit
1be7e2ea4c
@ -62,6 +62,11 @@ fn main() {
|
||||
disable_standard_handle_inheritability().unwrap();
|
||||
|
||||
let mut io = clidispatch::io::IO::stdio();
|
||||
let code = hgcommands::run_command(full_args, &mut io);
|
||||
let mut code = hgcommands::run_command(full_args, &mut io);
|
||||
if io.flush().is_err() {
|
||||
if code == 0 {
|
||||
code = 255;
|
||||
}
|
||||
}
|
||||
std::process::exit(code as i32);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user