From fe145888b590be8354cbb7890269424cfae4ca8f Mon Sep 17 00:00:00 2001 From: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:27:25 +0200 Subject: [PATCH] feat: add flag to `pixi search` (#2018) This makes it more consistent with `apt`. --- src/cli/clean.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/clean.rs b/src/cli/clean.rs index 0af629b44..2fbaae1af 100644 --- a/src/cli/clean.rs +++ b/src/cli/clean.rs @@ -60,8 +60,8 @@ pub struct CacheArgs { pub repodata: bool, /// Answer yes to all questions. - #[arg(long)] - pub yes: bool, + #[clap(short = 'y', long = "yes", long = "assume-yes")] + assume_yes: bool, // TODO: Would be amazing to have a --unused flag to clean only the unused cache. // By searching the inode count of the packages and removing based on that. // #[arg(long)] @@ -139,7 +139,7 @@ async fn clean_cache(args: CacheArgs) -> miette::Result<()> { if args.exec { dirs.push(cache_dir.join(consts::CACHED_ENVS_DIR)); } - if dirs.is_empty() && (args.yes || dialoguer::Confirm::new() + if dirs.is_empty() && (args.assume_yes || dialoguer::Confirm::new() .with_prompt("No cache types specified using the flags.\nDo you really want to remove all cache directories from your machine?") .interact_opt() .into_diagnostic()?