Skip to content

Commit ca4c678

Browse files
committed
Fix version check for git-snapshots and nightlies
1 parent fd1bc79 commit ca4c678

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: cli/updater/updater.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func NotifyNewVersionIsAvailable(latestVersion string) {
8080
// shouldCheckForUpdate return true if it actually makes sense to check for new updates,
8181
// false in all other cases.
8282
func shouldCheckForUpdate(currentVersion *semver.Version) bool {
83-
if strings.Contains(currentVersion.String(), "git") {
83+
if strings.Contains(currentVersion.String(), "git-snapshot") || strings.Contains(currentVersion.String(), "nightly") {
8484
// This is a dev build, no need to check for updates
8585
return false
8686
}

Diff for: cli/version/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func NewCommand() *cobra.Command {
4343
}
4444

4545
func run(cmd *cobra.Command, args []string) {
46-
if strings.Contains(globals.VersionInfo.VersionString, "git-snapshot") {
46+
if strings.Contains(globals.VersionInfo.VersionString, "git-snapshot") || strings.Contains(globals.VersionInfo.VersionString, "nightly") {
4747
// We're using a development version, no need to check if there's a
4848
// new release available
4949
feedback.Print(globals.VersionInfo)

0 commit comments

Comments
 (0)