diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-05-12 12:56:48 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-05-12 12:56:48 +0200 |
commit | 99ea5b924a0a449b604a9a9da0381f71b3b1e727 (patch) | |
tree | b439e609e1ab95424b8e698e4303e04807132465 /src/main.rs | |
parent | d671ce91bd74a7f31c5d36d217fd61668da3d66b (diff) |
Revert "Add automatic pager setup"
The automatic pager setup resulted in more confusion in using the CLI than in
benefit. Hence, remove this feature again.
This reverts commit b5a3f02a05311d5f5a4eb35b8d2513cb6a543560.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/main.rs b/src/main.rs index 7feb99b..20f0191 100644 --- a/src/main.rs +++ b/src/main.rs @@ -149,10 +149,7 @@ async fn main() -> Result<()> { let db_connection_config = crate::db::DbConnectionConfig::parse(&config, &cli)?; match cli.subcommand() { Some(("generate-completions", matches)) => generate_completions(matches), - Some(("db", matches)) => { - setup_pager(); - crate::commands::db(db_connection_config, &config, matches)? - }, + Some(("db", matches)) => crate::commands::db(db_connection_config, &config, matches)?, Some(("build", matches)) => { let conn = db_connection_config.establish_connection()?; @@ -172,7 +169,6 @@ async fn main() -> Result<()> { } Some(("what-depends", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::what_depends(matches, &config, repo) .await .context("what-depends command failed")? @@ -180,7 +176,6 @@ async fn main() -> Result<()> { Some(("dependencies-of", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::dependencies_of(matches, &config, repo) .await .context("dependencies-of command failed")? @@ -188,7 +183,6 @@ async fn main() -> Result<()> { Some(("versions-of", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::versions_of(matches, repo) .await .context("versions-of command failed")? @@ -196,7 +190,6 @@ async fn main() -> Result<()> { Some(("env-of", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::env_of(matches, repo) .await .context("env-of command failed")? @@ -204,7 +197,6 @@ async fn main() -> Result<()> { Some(("find-artifact", matches)) => { let repo = load_repo()?; - setup_pager(); let conn = db_connection_config.establish_connection()?; crate::commands::find_artifact(matches, &config, progressbars, repo, conn) .await @@ -213,7 +205,6 @@ async fn main() -> Result<()> { Some(("find-pkg", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::find_pkg(matches, &config, repo) .await .context("find-pkg command failed")? @@ -221,7 +212,6 @@ async fn main() -> Result<()> { Some(("source", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::source(matches, &config, repo, progressbars) .await .context("source command failed")? @@ -235,7 +225,6 @@ async fn main() -> Result<()> { Some(("lint", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::lint(&repo_path, matches, progressbars, &config, repo) .await .context("lint command failed")? @@ -243,7 +232,6 @@ async fn main() -> Result<()> { Some(("tree-of", matches)) => { let repo = load_repo()?; - setup_pager(); crate::commands::tree_of(matches, repo, progressbars) .await .context("tree-of command failed")? @@ -251,7 +239,6 @@ async fn main() -> Result<()> { Some(("metrics", _)) => { let repo = load_repo()?; - setup_pager(); let conn = db_connection_config.establish_connection()?; crate::commands::metrics(&repo_path, &config, repo, conn) .await @@ -259,7 +246,6 @@ async fn main() -> Result<()> { } Some(("endpoint", matches)) => { - setup_pager(); crate::commands::endpoint(matches, &config, progressbars) .await .context("endpoint command failed")? @@ -301,9 +287,3 @@ fn generate_completions(matches: &ArgMatches) { _ => unreachable!(), } } - -#[inline] -fn setup_pager() { - pager::Pager::new().setup(); -} - |