stdout for error nice

This commit is contained in:
Nils Pukropp committed 2021-05-11 08:15:20 +02:00
1 parent 3269a32a46
commit 41f2266c4d
1 file changed
+2 -3
+2 -3
View File
@@ -6,7 +6,6 @@ use std::{
fs::{canonicalize, create_dir_all}, fs::{canonicalize, create_dir_all},
io::Error, io::Error,
path::PathBuf, path::PathBuf,
process::ExitStatus,
}; };
use std::{path::Path, process::Command}; use std::{path::Path, process::Command};
@@ -107,7 +106,7 @@ impl YoutubeDL {
} else { } else {
Err(format!( Err(format!(
"Error downloading video: {:?}", "Error downloading video: {:?}",
output.stderr.as_slice() output.stdout.as_slice()
)) ))
} }
} }
@@ -132,7 +131,7 @@ impl YoutubeDL {
cmd.arg(&self.link); cmd.arg(&self.link);
let mut pr = match cmd.spawn() { let pr = match cmd.spawn() {
Err(why) => { Err(why) => {
return Err(why); return Err(why);
} }