diff --git a/config.go b/config.go index c951de1..00dadc2 100644 --- a/config.go +++ b/config.go @@ -56,7 +56,7 @@ func (b *ggrBrowsers) find(browser, version string, platform string, excludedHos platform = b.DefaultPlatform } for _, v := range b.Versions { - if strings.HasPrefix(v.Number, version) && strings.HasPrefix(v.Platform, platform) { + if strings.HasPrefix(v.Number, version) && (v.Platform == "" || strings.HasPrefix(v.Platform, platform)) { version = v.Number next: for _, r := range v.Regions { diff --git a/config_test.go b/config_test.go index 3771c9a..cdfc938 100644 --- a/config_test.go +++ b/config_test.go @@ -99,7 +99,7 @@ func TestFindDefaultVersion(t *testing.T) { } func TestFindVersion(t *testing.T) { - hosts, version, _ := browsersWithMultipleVersions.find("browser", "1.0", "", newSet(), newSet()) + hosts, version, _ := browsersWithMultipleVersions.find("browser", "1.0", "LINUX", newSet(), newSet()) AssertThat(t, version, EqualTo{"1.0"}) AssertThat(t, len(hosts), EqualTo{1}) AssertThat(t, hosts[0].Name, EqualTo{"browser-1.0"})