Hide interactive output when -q flag is set

This commit is contained in:
bytedream 2023-06-24 13:05:30 +02:00
parent 75b6e7b452
commit 618d2206a2

View file

@ -120,8 +120,20 @@ pub async fn cli_entrypoint() {
debug!("cli input: {:?}", cli); debug!("cli input: {:?}", cli);
match &mut cli.command { match &mut cli.command {
Command::Archive(archive) => pre_check_executor(archive).await, Command::Archive(archive) => {
Command::Download(download) => pre_check_executor(download).await, // prevent interactive select to be shown when output should be quiet
if cli.verbosity.is_some() && cli.verbosity.as_ref().unwrap().quiet {
archive.yes = true;
}
pre_check_executor(archive).await
}
Command::Download(download) => {
// prevent interactive select to be shown when output should be quiet
if cli.verbosity.is_some() && cli.verbosity.as_ref().unwrap().quiet {
download.yes = true;
}
pre_check_executor(download).await
}
Command::Login(login) => { Command::Login(login) => {
if login.remove { if login.remove {
if let Some(session_file) = login::session_file_path() { if let Some(session_file) = login::session_file_path() {