Skip to content

Commit

Permalink
feat(cli): add --dry-run to bootstrap command
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshal101 authored and hanshal101 committed Jun 27, 2024
1 parent 731bfe0 commit 494ee38
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions cmd/glasskube/cmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,12 @@ var bootstrapCmd = &cobra.Command{
fmt.Fprintf(os.Stderr, "\nAn error occurred during bootstrap:\n%v\n", err)
cliutils.ExitWithError()
}
if bootstrapCmdOptions.dryrun {
if err := printBootstrap(
manifests,
bootstrapCmdOptions.Output,
); err != nil {
fmt.Fprintf(os.Stderr, "\nAn error occurred in printing : %v\n", err)
cliutils.ExitWithError()
}
} else {
if err := printBootstrap(
manifests,
bootstrapCmdOptions.Output,
); err != nil {
fmt.Fprintf(os.Stderr, "\nAn error occurred in printing : %v\n", err)
cliutils.ExitWithError()
}
if err := printBootstrap(
manifests,
bootstrapCmdOptions.Output,
); err != nil {
fmt.Fprintf(os.Stderr, "\nAn error occurred in printing : %v\n", err)
cliutils.ExitWithError()
}
},
}
Expand Down

0 comments on commit 494ee38

Please sign in to comment.