Skip to content

Commit

Permalink
Fix amd64 detection on Windows and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Nov 12, 2023
1 parent 8241a01 commit ad448b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ private String determineArchitectureForWindows() throws ProtocResolutionExceptio
var arch = HostEnvironment.cpuArchitecture();

switch (arch) {
case "amd64":
case "x86_64":
return "x86_64";

case "x86_32":
case "x86":
case "x86_32":
return "x86_32";

default:
Expand Down Expand Up @@ -116,6 +117,7 @@ private String determineArchitectureForMacOs() {
case "aarch64":
return "aarch_64";

case "amd64":
case "x86_64":
return "x86_64";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ void setUp() {

@DisplayName("Supported Windows architectures resolve correctly")
@CsvSource({
" amd64, windows-x86_64",
"x86_64, windows-x86_64",
"x86, windows-x86_32",
"x86_32, windows-x86_32",
})
@ParameterizedTest(name = "for architecture {0}, expect classifier matching \"{1}\"")
Expand Down Expand Up @@ -119,6 +121,7 @@ void unsupportedLinuxArchitecturesResultInException() {
@DisplayName("Supported Mac OS architectures resolve correctly")
@CsvSource({
"aarch64, osx-aarch_64",
" amd64, osx-x86_64",
" x86_64, osx-x86_64",
})
@ParameterizedTest(name = "for architecture {0}, expect classifier matching \"{1}\"")
Expand Down

0 comments on commit ad448b8

Please sign in to comment.