Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #237 from s1cyan/versionsha-fix
Browse files Browse the repository at this point in the history
handle version changed to sha256
  • Loading branch information
davco01a authored Nov 4, 2020
2 parents 7b93378 + 01085ed commit c40073d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ func is06Compatible() bool {
if servicesVersion == "latest" {
return true
}
servicesVersion1stVal, _ := strconv.Atoi(strings.Split(servicesVersion, ".")[0])
servicesVersion2ndVal, _ := strconv.Atoi(strings.Split(servicesVersion, ".")[1])
if servicesVersion2ndVal < 6 && servicesVersion1stVal == 0 {
if strings.Contains(servicesVersion, ".") { //check if this is a version eg: 0.9.1 vs a sha256
servicesVersion1stVal, _ := strconv.Atoi(strings.Split(servicesVersion, ".")[0])
servicesVersion2ndVal, _ := strconv.Atoi(strings.Split(servicesVersion, ".")[1])
if servicesVersion2ndVal < 6 && servicesVersion1stVal == 0 {

fmt.Printf("\nYour current CLI version (%s) is incompatible with the command line service image (%s). Please upgrade your command line service to version 0.6.0 or greater, or get a version of the CLI that matches the service image\n", VERSION, servicesVersion)
return false
fmt.Printf("\nYour current CLI version (%s) is incompatible with the command line service image (%s). Please upgrade your command line service to version 0.6.0 or greater, or get a version of the CLI that matches the service image\n", VERSION, servicesVersion)
return false
}
}
return true
}
Expand Down

0 comments on commit c40073d

Please sign in to comment.