@@ -15,10 +15,6 @@ import (
1515 "github.com/spf13/cobra"
1616)
1717
18- var (
19- forceInstall bool
20- )
21-
2218// installCmd represents the install command
2319var installCmd = & cobra.Command {
2420 Use : "install" ,
@@ -29,8 +25,7 @@ Performs a clean installation by:
2925- Re-downloading and installing all rules specified in rules.json
3026
3127This ensures the rules directory matches exactly what's defined in rules.json.` ,
32- Example : ` rules install
33- rules install --force` ,
28+ Example : ` rules install` ,
3429 RunE : func (cmd * cobra.Command , args []string ) error {
3530 // Get rules directory for the format
3631 rulesDir , err := formats .GetRulesDirectory (format )
@@ -82,21 +77,7 @@ This ensures the rules directory matches exactly what's defined in rules.json.`,
8277
8378 // Check if rules directory exists
8479 if _ , err := os .Stat (rulesDir ); err == nil {
85- // Directory exists, check if we should clean it
86- if ! forceInstall {
87- color .Yellow ("This will remove all existing rules in '%s' and reinstall them from rules.json." , rulesDir )
88- fmt .Print ("Continue? (y/N): " )
89-
90- var response string
91- fmt .Scanln (& response )
92-
93- if strings .ToLower (response ) != "y" {
94- color .Yellow ("Installation cancelled." )
95- return nil
96- }
97- }
98-
99- // Remove all files and directories in the rules directory
80+ // Directory exists, clean it without confirmation
10081 color .Cyan ("Removing existing rules from '%s'..." , rulesDir )
10182 if err := removeContents (rulesDir ); err != nil {
10283 return fmt .Errorf ("failed to clean rules directory: %w" , err )
@@ -191,7 +172,4 @@ func removeContents(dir string) error {
191172
192173func init () {
193174 rootCmd .AddCommand (installCmd )
194-
195- // Add flags
196- installCmd .Flags ().BoolVar (& forceInstall , "force" , false , "Skip confirmation prompts" )
197175}
0 commit comments