diff --git a/.github/workflows/auto-invite.yml b/.github/workflows/auto-invite.yml index 2f7fc9e29..bb74351f0 100644 --- a/.github/workflows/auto-invite.yml +++ b/.github/workflows/auto-invite.yml @@ -21,4 +21,4 @@ jobs: qq group : 98488045 sealos dingtalk group : 35371178 home Website: https://www.sealyun.com - developer please add my dingtalk or wechat : cuisongliu \ No newline at end of file + developer please add my dingtalk or wechat : cuisongliu diff --git a/cmd/delete.go b/cmd/delete.go index df489e7a1..11dcdd53d 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -51,7 +51,9 @@ var deleteCmd = &cobra.Command{ _ = appmanager.DeleteApp(cfg, cfgFile) }, PreRun: func(cmd *cobra.Command, args []string) { - logger.Fatal("the delete app feature not support") + if !feature { + logger.Fatal("the delete app feature not support") + } if install.ExitDeleteCase(AppURL) { _ = cmd.Help() os.Exit(install.ErrorExitOSCase) diff --git a/cmd/install.go b/cmd/install.go index c95a2081b..0ec04b315 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -54,7 +54,9 @@ var installCmd = &cobra.Command{ _ = appmanager.InstallApp(cfg, cfgFile) }, PreRun: func(cmd *cobra.Command, args []string) { - logger.Fatal("the install app feature not support") + if !feature { + logger.Fatal("the install app feature not support") + } if install.ExitInstallCase(AppURL) { _ = cmd.Help() os.Exit(install.ErrorExitOSCase) diff --git a/cmd/root.go b/cmd/root.go index 9a4d0fe0e..dbe488455 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -29,6 +29,7 @@ import ( var ( cfgFile string Info bool + feature bool ) // rootCmd represents the base command when called without any subcommands @@ -52,6 +53,7 @@ func Execute() { func init() { cobra.OnInitialize(initConfig) rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.sealos/config.yaml)") + rootCmd.PersistentFlags().BoolVar(&feature, "feature", false, "need use new feature. ex app feature") rootCmd.PersistentFlags().BoolVar(&Info, "info", false, "logger ture for Info, false for Debug") }