Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable update checking in stripe listen command #531

Merged
merged 1 commit into from
Nov 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/cmd/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ type listenCmd struct {
printJSON bool
skipVerify bool
onlyPrintSecret bool

apiBaseURL string
noWSS bool
skipUpdate bool
apiBaseURL string
noWSS bool
}

func newListenCmd() *listenCmd {
Expand Down Expand Up @@ -68,6 +68,7 @@ Stripe account.`,
lc.cmd.Flags().BoolVarP(&lc.useConfiguredWebhooks, "use-configured-webhooks", "a", false, "Load webhook endpoint configuration from the webhooks API/dashboard")
lc.cmd.Flags().BoolVarP(&lc.skipVerify, "skip-verify", "", false, "Skip certificate verification when forwarding to HTTPS endpoints")
lc.cmd.Flags().BoolVar(&lc.onlyPrintSecret, "print-secret", false, "Only print the webhook signing secret and exit")
lc.cmd.Flags().BoolVarP(&lc.skipUpdate, "skip-update", "s", false, "Skip checking latest version of Stripe CLI")

// Hidden configuration flags, useful for dev/debugging
lc.cmd.Flags().StringVar(&lc.apiBaseURL, "api-base", "", "Sets the API base URL")
Expand Down Expand Up @@ -102,7 +103,7 @@ func (lc *listenCmd) runListenCmd(cmd *cobra.Command, args []string) error {
return err
}

if !lc.printJSON && !lc.onlyPrintSecret {
if !lc.printJSON && !lc.onlyPrintSecret && !lc.skipUpdate {
version.CheckLatestVersion()
}

Expand Down