Skip to content

Commit

Permalink
Keep downloading arch-specific binary for all OSes
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Sep 6, 2024
1 parent 3028096 commit 2f1afb2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/packaging/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func FetchBinary(ctx context.Context, localCacheDir, name, binaryName, channelOr
return "", errors.New("empty cache dir argument")
}

// put binaries in arch specific directory to avoid naming collisions in wix msi building
// put binaries in arch specific directory for Windows to avoid naming collisions in wix msi building
// where a single destination will have multiple, mutally exclusive sources
if target.Platform == Windows {
localCacheDir = filepath.Join(localCacheDir, string(target.Arch))
Expand Down Expand Up @@ -142,11 +142,7 @@ func dlTarPath(name, channelOrVersion, platform, arch string) (string, error) {
}

func dlTarPathFromVersion(name, version, platform, arch string) string {
// Include arch for Windows
if platform == string(Windows) {
return path.Join("kolide", name, platform, arch, fmt.Sprintf("%s-%s.tar.gz", name, version))
}
return path.Join("kolide", name, platform, fmt.Sprintf("%s-%s.tar.gz", name, version))
return path.Join("kolide", name, platform, arch, fmt.Sprintf("%s-%s.tar.gz", name, version))
}

//go:embed assets/tuf/root.json
Expand Down

0 comments on commit 2f1afb2

Please sign in to comment.