Skip to content

Commit dc9450d

Browse files
author
njelich
committed
fix: use string instead due to -X limitations
1 parent d509b10 commit dc9450d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/update.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var (
5959
githubAPIBase = "https://api.github.com"
6060
download = doDownload
6161
osExecutable = os.Executable
62-
disableUpdateSubcommand = false
62+
disableUpdateSubcommand = "false"
6363
)
6464

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

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

0 commit comments

Comments
 (0)