crowdsec/cmd/crowdsec-cli/config_restore.go
mmetc b582730d06
remove commands "cscli config backup/restore" (#3158)
* remove "cscli config backup/restore"
* remove backup/restore calls from deb,rpm pre/postinst and wizard
* remove from prerm too
2025-01-16 14:02:39 +01:00

20 lines
441 B
Go

package main
import (
"fmt"
"github.com/spf13/cobra"
)
func (cli *cliConfig) newRestoreCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "restore",
DisableAutoGenTag: true,
RunE: func(cmd *cobra.Command, _ []string) error {
configDir := cli.cfg().ConfigPaths.ConfigDir
return fmt.Errorf("'cscli config restore' has been removed, you can manually backup/restore %s instead", configDir)
},
}
return cmd
}