| 235 | } |
| 236 | |
| 237 | func (cli *cliLapi) newContextDeleteCmd() *cobra.Command { |
| 238 | cmd := &cobra.Command{ |
| 239 | Use: "delete", |
| 240 | DisableAutoGenTag: true, |
| 241 | RunE: func(_ *cobra.Command, _ []string) error { |
| 242 | filePath := cli.cfg().Crowdsec.ConsoleContextPath |
| 243 | if filePath == "" { |
| 244 | filePath = "the context file" |
| 245 | } |
| 246 | |
| 247 | return fmt.Errorf("command 'delete' has been removed, please manually edit %s", filePath) |
| 248 | }, |
| 249 | } |
| 250 | |
| 251 | return cmd |
| 252 | } |
| 253 | |
| 254 | func (cli *cliLapi) newContextCmd() *cobra.Command { |
| 255 | cmd := &cobra.Command{ |