@@ -197,7 +197,7 @@ func (*cliConsole) getDefaultInstanceName() string {
197197func (cli * cliConsole ) newEnrollCmd () * cobra.Command {
198198 name := ""
199199 overwrite := false
200- autoEnroll := false
200+ quickEnroll := false
201201 tags := []string {}
202202 enableOpts := []string {}
203203 disableOpts := []string {}
@@ -222,11 +222,11 @@ valid options are : %s,all (see 'cscli console status' for details)`, strings.Jo
222222 Args : args .MinimumNArgs (0 ),
223223 DisableAutoGenTag : true ,
224224 RunE : func (cmd * cobra.Command , args []string ) error {
225- if len (args ) == 0 && ! autoEnroll {
225+ if len (args ) == 0 && ! quickEnroll {
226226 return cmd .Usage ()
227227 }
228- if len (args ) > 0 && autoEnroll {
229- return errors .New ("enroll key cannot be specified when using auto- enroll" )
228+ if len (args ) > 0 && quickEnroll {
229+ return errors .New ("enroll key cannot be specified when using quick enroll" )
230230 }
231231 key := ""
232232 if len (args ) > 0 {
@@ -244,7 +244,7 @@ valid options are : %s,all (see 'cscli console status' for details)`, strings.Jo
244244 return err
245245 }
246246
247- return cli .enroll (cmd .Context (), key , name , overwrite , tags , opts , autoEnroll )
247+ return cli .enroll (cmd .Context (), key , name , overwrite , tags , opts , quickEnroll )
248248 },
249249 }
250250
@@ -254,7 +254,7 @@ valid options are : %s,all (see 'cscli console status' for details)`, strings.Jo
254254 flags .StringSliceVarP (& tags , "tags" , "t" , tags , "Tags to display in the console" )
255255 flags .StringSliceVarP (& enableOpts , "enable" , "e" , enableOpts , "Enable console options" )
256256 flags .StringSliceVarP (& disableOpts , "disable" , "d" , disableOpts , "Disable console options" )
257- flags .BoolVarP (& autoEnroll , "auto " , "a " , false , "Enrolls the instance without an enroll key by visiting a link to the CrowdSec console." )
257+ flags .BoolVarP (& quickEnroll , "quick " , "q " , false , "Enrolls the instance without an enroll key by visiting a link to the CrowdSec console." )
258258
259259 return cmd
260260}
0 commit comments