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

fix version string "vnot connected" #460

Merged
merged 3 commits into from
Oct 15, 2021
Merged

fix version string "vnot connected" #460

merged 3 commits into from
Oct 15, 2021

Conversation

mxyng
Copy link
Collaborator

@mxyng mxyng commented Oct 14, 2021

s/not connected/disconnected/

Fixes #459

@@ -80,12 +80,19 @@ func checkUpdate(clientSemVer, serverSemVer string) error {
latestSemVer = strings.TrimSpace(string(body))
}

var latestVersion string

_, err = fmt.Sscanf(latestSemVer, "v%s", &latestVersion)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latestVersion will only be printed if it's a valid semver which needs to start with v so shouldn't need to check if Sscanf actually scanned anything

@mxyng mxyng changed the title #459 fix version string "vnot connected" fix version string "vnot connected" Oct 14, 2021
@mxyng mxyng requested a review from ssoroka October 14, 2021 17:00
@mxyng mxyng merged commit 9290632 into main Oct 15, 2021
@jmorganca jmorganca deleted the fix-version-string branch November 28, 2021 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extra character displayed in registry version if logged out
2 participants