Skip to content

Commit

Permalink
fix dryrun and skip confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
petedannemann committed Nov 16, 2023
1 parent 1f8d7b4 commit 23f7979
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/topicctl/subcmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ type createCmdConfig struct {
var createConfig createCmdConfig

func init() {
createCmd.Flags().BoolVar(
createCmd.PersistentFlags().BoolVar(
&createConfig.dryRun,
"dry-run",
false,
"Do a dry-run",
)
createCmd.Flags().StringVar(
createCmd.PersistentFlags().StringVar(
&createConfig.pathPrefix,
"path-prefix",
os.Getenv("TOPICCTL_ACL_PATH_PREFIX"),
"Prefix for ACL config paths",
)
createCmd.Flags().BoolVar(
createCmd.PersistentFlags().BoolVar(
&createConfig.skipConfirm,
"skip-confirm",
false,
Expand Down Expand Up @@ -150,9 +150,9 @@ func createACL(
adminClient, err = clusterConfig.NewAdminClient(
ctx,
nil,
applyConfig.dryRun,
applyConfig.shared.saslUsername,
applyConfig.shared.saslPassword,
createConfig.dryRun,
createConfig.shared.saslUsername,
createConfig.shared.saslPassword,
)
if err != nil {
return err
Expand All @@ -172,8 +172,8 @@ func createACL(
)

creatorConfig := create.ACLCreatorConfig{
DryRun: applyConfig.dryRun,
SkipConfirm: applyConfig.skipConfirm,
DryRun: createConfig.dryRun,
SkipConfirm: createConfig.skipConfirm,
ACLConfig: aclConfig,
ClusterConfig: clusterConfig,
}
Expand Down

0 comments on commit 23f7979

Please sign in to comment.