Skip to content

Commit

Permalink
Fix disable-telemetry flag to be a true boolean flag (#124)
Browse files Browse the repository at this point in the history
Signed-off-by: Jussi Nummelin <[email protected]>
  • Loading branch information
jnummelin committed Apr 21, 2021
1 parent 27e1cc6 commit 9dc8830
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ var (
TakesFile: true,
}

analyticsFlag = &cli.StringFlag{
Name: "--disable-telemetry",
Hidden: true,
analyticsFlag = &cli.BoolFlag{
Name: "disable-telemetry",
EnvVars: []string{"DISABLE_TELEMETRY"},
Hidden: true,
}
)

Expand Down Expand Up @@ -95,6 +96,7 @@ func displayCopyright(ctx *cli.Context) error {

func initAnalytics(ctx *cli.Context) error {
if ctx.Bool("disable-telemetry") {
log.Tracef("disabling telemetry")
return nil
}

Expand Down
1 change: 1 addition & 0 deletions smoke-test/smoke.common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FOOTLOOSE_TEMPLATE=${FOOTLOOSE_TEMPLATE:-"footloose.yaml.tpl"}

export LINUX_IMAGE=${LINUX_IMAGE:-"quay.io/footloose/ubuntu18.04"}
export PRESERVE_CLUSTER=${PRESERVE_CLUSTER:-""}
export DISABLE_TELEMETRY=true


function createCluster() {
Expand Down

0 comments on commit 9dc8830

Please sign in to comment.