Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/topo/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func init() {
}

func resolveSkipVersionChecks(cmd *cobra.Command) bool {
if env.IsVarTruthy(disableSelfUpgradeEnvVar) {
return true
}

if !cmd.Flags().Changed(skipVersionChecksFlag) {
return env.IsVarTruthy(skipVersionChecksEnvVar)
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/topo/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"github.com/spf13/cobra"
)

const disableSelfUpgradeEnvVar = "TOPO_DISABLE_SELF_UPGRADE"

var upgradeCmd = &cobra.Command{
Use: "upgrade",
Short: "Upgrade topo to the latest version",
Expand Down Expand Up @@ -55,7 +57,6 @@ func init() {
}

func isSelfUpgradeDisabled() bool {
const disableSelfUpgradeEnvVar = "TOPO_DISABLE_SELF_UPGRADE"
if env.IsVarTruthy(disableSelfUpgradeEnvVar) {
return true
}
Expand Down