don't install restic as default

This commit is contained in:
cupcakearmy 2021-10-30 14:36:16 +02:00
parent 3b99e301e9
commit a7944aed1f
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

View File

@ -9,12 +9,12 @@ var uninstallCmd = &cobra.Command{
Use: "uninstall", Use: "uninstall",
Short: "Uninstall restic and autorestic", Short: "Uninstall restic and autorestic",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
noRestic, _ := cmd.Flags().GetBool("no-restic") restic, _ := cmd.Flags().GetBool("restic")
bins.Uninstall(!noRestic) bins.Uninstall(restic)
}, },
} }
func init() { func init() {
rootCmd.AddCommand(uninstallCmd) rootCmd.AddCommand(uninstallCmd)
uninstallCmd.Flags().Bool("no-restic", false, "do not uninstall restic.") uninstallCmd.Flags().Bool("restic", false, "also uninstall restic.")
} }