fix: read stderr in download

This commit is contained in:
OlivierDehaene 2024-01-25 15:32:43 +01:00
parent 86c8335f1b
commit 29cad22615

View File

@ -832,14 +832,19 @@ fn download_convert_model(args: &Args, running: Arc<AtomicBool>) -> Result<(), L
}
};
// Redirect STDOUT to the console
let download_stdout = download_process.stdout.take().unwrap();
let stdout = BufReader::new(download_stdout);
let download_stderr = download_process.stderr.take().unwrap();
let stderr = BufReader::new(download_stderr);
thread::spawn(move || {
log_lines(stdout.lines());
});
thread::spawn(move || {
log_lines(stderr.lines());
});
loop {
if let Some(status) = download_process.try_wait().unwrap() {
if status.success() {