@@ -7,7 +7,6 @@ use std::sync::Arc;
77
88use anyhow:: { anyhow, bail, Context , Result } ;
99use clap:: { Args , ValueEnum } ;
10- use colored:: Colorize ;
1110use solve:: { DecisionFormatter , DecisionFormatterBuilder , MultiSolverKind } ;
1211use spk_schema:: foundation:: format:: FormatIdent ;
1312use spk_schema:: foundation:: ident_build:: Build ;
@@ -707,12 +706,10 @@ where
707706
708707#[ derive( Args , Clone ) ]
709708pub struct Repositories {
710- /// Enable the local repository (DEPRECATED)
711- ///
712- /// This option is ignored and the local repository is enabled by default.
709+ /// This option will enable the local repository only.
713710 /// Use `--no-local-repo` to disable the local repository.
714- #[ clap( short, long , value_parser = warn_local_flag_deprecated ) ]
715- pub local_repo : bool ,
711+ #[ clap( short = 'L' , long ) ]
712+ pub local_repo_only : bool ,
716713
717714 /// Disable the local repository
718715 #[ clap( long, hide = true ) ]
@@ -776,9 +773,6 @@ impl Repositories {
776773 /// This behavior can be altered with the `--enable-repo`, `--disable-repo`,
777774 /// and `--no-local-repo` flags.
778775 ///
779- /// For backwards compatibility purposes, if the deprecated `--local-repo`
780- /// flag is used, then only the local repo is enabled.
781- ///
782776 /// The `--enable-repo` is considered additive instead of exclusive.
783777 ///
784778 /// Remote repos enabled with `--enable-repo` are added to the list before
@@ -795,7 +789,7 @@ impl Repositories {
795789 let repo = storage:: local_repository ( ) . await ?;
796790 repos. push ( ( "local" . into ( ) , repo. into ( ) ) ) ;
797791 }
798- if self . local_repo {
792+ if self . local_repo_only {
799793 return Ok ( repos) ;
800794 }
801795 for name in self
@@ -946,18 +940,3 @@ impl DecisionFormatterSettings {
946940 Ok ( builder)
947941 }
948942}
949-
950- fn warn_local_flag_deprecated ( arg : & str ) -> Result < bool > {
951- // This will be called with `"true"` if the flag is present on the command
952- // line.
953- if arg == "true" {
954- // Logging is not configured at this point (args have to parsed to
955- // know verbosity level before logging can be configured).
956- eprintln ! (
957- "{warning}: The -l (--local-repo) is deprecated, please remove it from your command line!" ,
958- warning = "WARNING" . yellow( ) ) ;
959- Ok ( true )
960- } else {
961- Ok ( false )
962- }
963- }
0 commit comments