mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Hide interactive output when -q flag is set
This commit is contained in:
parent
75b6e7b452
commit
618d2206a2
1 changed files with 14 additions and 2 deletions
|
|
@ -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() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue