fix: add --no-install for activate command (#536)

to fix #534

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
This commit is contained in:
Peter Pan
2023-07-03 18:36:02 +08:00
committed by GitHub
parent 5a983c4a0a
commit 1f5462c80b
3 changed files with 12 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ func (*Integration) Get(name string) (IIntegration, error) {
return integrations[name], nil
}
func (*Integration) Activate(name string, namespace string, activeFilters []string) error {
func (*Integration) Activate(name string, namespace string, activeFilters []string, skipInstall bool) error {
if _, ok := integrations[name]; !ok {
return errors.New("integration not found")
}
@@ -83,8 +83,10 @@ func (*Integration) Activate(name string, namespace string, activeFilters []stri
viper.Set("active_filters", uniqueFilters)
if err := integrations[name].Deploy(namespace); err != nil {
return err
if !skipInstall {
if err := integrations[name].Deploy(namespace); err != nil {
return err
}
}
if err := viper.WriteConfig(); err != nil {