Skip to content

Commit 0156872

Browse files
authored
PRODENG-2607 Fixed osHost OS + Arch interpretation for binary download (#462)
Signed-off-by: Dimitar Dimitrov <[email protected]>
1 parent cf903bf commit 0156872

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

version/version.go

+2-12
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,8 @@ func (a *Asset) IsForHost() bool {
4343
return false
4444
}
4545

46-
goos := runtime.GOOS
47-
if goos == "windows" {
48-
goos = "win"
49-
}
50-
51-
arch := runtime.GOARCH
52-
if arch == "amd64" {
53-
arch = "x64"
54-
}
55-
56-
parts := strings.Split(strings.TrimSuffix(a.Name, ".exe"), "-")
57-
return parts[1] == goos && parts[2] == arch
46+
parts := strings.Split(strings.TrimSuffix(a.Name, ".exe"), "_")
47+
return parts[1] == runtime.GOOS && parts[2] == runtime.GOARCH
5848
}
5949

6050
// LaunchpadRelease describes a launchpad release.

0 commit comments

Comments
 (0)