Skip to content

Commit 76e98df

Browse files
authored
Distinguish architectures on windows (#2593)
Signed-off-by: Bob Weinand <[email protected]>
1 parent f9d0729 commit 76e98df

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

datadog-setup.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,16 @@ function is_alpine()
11061106
function get_architecture()
11071107
{
11081108
if (IS_WINDOWS) {
1109-
return "x86_64";
1109+
if (PHP_INT_SIZE === 4) {
1110+
// we don't support that one, but we include it so that the installer can properly fail
1111+
return "x86";
1112+
} else {
1113+
if ($env = getenv("PROCESSOR_ARCHITECTURE")) {
1114+
return $env === "AMD64" ? "x86_64" : strtolower($env);
1115+
}
1116+
// fallback
1117+
return "x86_64";
1118+
}
11101119
}
11111120

11121121
return execute_or_exit(

0 commit comments

Comments
 (0)