Skip to content

Commit

Permalink
feat(cli): add --dry-run to uninstall command
Browse files Browse the repository at this point in the history
Signed-off-by: hanshal101 <[email protected]>
  • Loading branch information
hanshal101 committed Aug 14, 2024
1 parent 46e950f commit c1dd6fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/uninstall/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"os"

"github.com/glasskube/glasskube/api/v1alpha1"
"github.com/glasskube/glasskube/internal/controller/ctrlpkg"
Expand Down Expand Up @@ -39,6 +40,7 @@ func (obj *uninstaller) UninstallBlocking(ctx context.Context, pkg ctrlpkg.Packa
}

if isDryRun {
fmt.Fprintln(os.Stderr, "🔎 Dry-run mode is enabled. Nothing will be changed.")
return nil
} else {
return obj.awaitDeletion(ctx, pkg)
Expand Down

0 comments on commit c1dd6fe

Please sign in to comment.