Skip to content

Commit 4f0bfc7

Browse files
committed
fix: resolve comments
1 parent dc9450d commit 4f0bfc7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/update.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ var (
5959
githubAPIBase = "https://api.github.com"
6060
download = doDownload
6161
osExecutable = os.Executable
62-
disableUpdateSubcommand = "false"
62+
// I have to use a string for DisableUpdateCmd because of the limitations of the -X flag in Go build.
63+
DisableUpdateCmd = "false"
6364
)
6465

6566
// semverDiffers reports whether versions a and b differ (ignoring leading 'v').
@@ -506,8 +507,7 @@ then downloads and replaces the current binary.`,
506507
}
507508

508509
func init() {
509-
// I have to use a string here because of the limitations of the -X flag in Go build.
510-
if disableUpdateSubcommand == "true" {
510+
if DisableUpdateCmd == "true" {
511511
return
512512
}
513513
updateCmd.Flags().AddFlagSet(progress.AnswerYesFlag)

0 commit comments

Comments
 (0)