mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 04:14:52 +00:00
fix: read stderr in download
This commit is contained in:
parent
86c8335f1b
commit
29cad22615
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user