Skip to content

Commit af2e4ca

Browse files
fix: handle case-insensitive log
1 parent 31ac9a0 commit af2e4ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shared.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33728,8 +33728,8 @@ func GetDockerClient() (*dockerclient.Client, string, error) {
3372833728
return cli, dockerApiVersion,nil
3372933729
}
3373033730

33731-
if strings.Contains(err.Error(), "Minimum supported API version is") {
33732-
re := regexp.MustCompile(`Minimum supported API version is ([0-9\.]+)`)
33731+
if strings.Contains(strings.ToLower(err.Error()), strings.ToLower("Minimum supported API version is")) {
33732+
re := regexp.MustCompile(`(?i)minimum supported api version is ([0-9\.]+)`)
3373333733
match := re.FindStringSubmatch(err.Error())
3373433734
if len(match) == 2 {
3373533735
required := match[1]
@@ -33743,8 +33743,8 @@ func GetDockerClient() (*dockerclient.Client, string, error) {
3374333743
}
3374433744
}
3374533745

33746-
if strings.Contains(err.Error(), "Maximum supported API version is") {
33747-
re := regexp.MustCompile(`Maximum supported API version is ([0-9\.]+)`)
33746+
if strings.Contains(strings.ToLower(err.Error()), strings.ToLower("Maximum supported API version is")) {
33747+
re := regexp.MustCompile(`(?i)maximum supported api version is ([0-9\.]+)`)
3374833748
match := re.FindStringSubmatch(err.Error())
3374933749
if len(match) == 2 {
3375033750
required := match[1]

0 commit comments

Comments
 (0)