Skip to content

Commit

Permalink
Add success message
Browse files Browse the repository at this point in the history
Signed-off-by: Prasad Ghangal <[email protected]>
  • Loading branch information
PrasadG193 committed Jun 28, 2021
1 parent 8d94606 commit 7333393
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/apps/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func runInstall(ctx context.Context, app App, c *config.AppConfig, m Method, app
fmt.Printf("DEBUG: Failed to report event. %s\n", err1.Error())
}
}
fmt.Printf("App %s installed successfully!", appName)
return nil
}

Expand Down Expand Up @@ -149,25 +150,21 @@ func runUninstall(ctx context.Context, app App, c *config.AppConfig, m Method, a
return handleUninstallError(ctx, err, event, appName, namespace)
}

// Run preinstall
// Delete preinstall apps
for _, phase := range c.App.PreInstall {
for _, a := range phase.Apps {
if err := Run(ctx, m, a, namespace, filepath.Join(filepath.Dir(appConfigPath), a+".yaml")); err != nil {
return handleUninstallError(ctx, err, event, appName, namespace)
}
}
for _, a := range phase.Steps {
if err := execCommand(a); err != nil {
return handleUninstallError(ctx, err, event, appName, namespace)
}
}
}

if viper.GetBool(config.AnalyticsEnabled) {
if err1 := event.Report(context.TODO(), events.ECInstallSuccess, nil, nil); err1 != nil {
if err1 := event.Report(context.TODO(), events.ECUninstallSuccess, nil, nil); err1 != nil {
fmt.Printf("DEBUG: Failed to report event. %s\n", err1.Error())
}
}
fmt.Printf("App %s uninstalled successfully!", appName)
return nil
}

Expand Down

0 comments on commit 7333393

Please sign in to comment.