Skip to content

Commit

Permalink
Make version error messages mutually exclusive.
Browse files Browse the repository at this point in the history
  • Loading branch information
Curtis Schlak committed Mar 6, 2024
1 parent 18facfb commit 42c70ea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,9 @@ func setupLearnAPI(getPresignedPostUrl bool) {
versionInstalled, versionInstalledErr := semver.NewVersion(currentReleaseVersion)
if versionRemoteErr != nil {
fmt.Printf("Failed to parse the CLI's current version. Err: %v", err)
}
if versionInstalledErr != nil {
} else if versionInstalledErr != nil {
fmt.Printf("Failed to parse the latest CLI release version. Err: %v", err)
}
if versionInstalled.LessThan(versionRemote) {
} else if versionInstalled.LessThan(versionRemote) {
fmt.Printf("\nWARNING: There is newer version of the learn tool available.\nLatest: %s\nCurrent: %s\nTo avoid issues, upgrade by following the instructions at this link:\nhttps://github.com/gSchool/glearn-cli/blob/master/upgrade_instructions.md\n\n", version, currentReleaseVersion)
}
}
Expand Down

0 comments on commit 42c70ea

Please sign in to comment.