Skip to content

Commit 32a9a2a

Browse files
committed
src,test: treat M1 macs as unknown for now
1 parent c651df3 commit 32a9a2a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/binding.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ NAN_METHOD(GetCPUInfo) {
113113
SET_NUM("part", details.part);
114114
SET_NUM("revision", details.revision);
115115
SET_VAL("flags", GenerateFlags(&details.features));
116-
#elif defined(CPU_FEATURES_ARCH_AARCH64)
116+
// M1 mac support is currently missing in cpu_features
117+
#elif defined(CPU_FEATURES_ARCH_AARCH64) && !defined(CPU_FEATURES_OS_MACOS)
117118
const Aarch64Info details = GetAarch64Info();
118119
SET_STR("arch", "aarch64");
119120
SET_NUM("implementer", details.implementer);

test/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ console.log(info);
88
assert(typeof info === 'object' && info !== null);
99
assert(typeof info.arch === 'string' && info.arch);
1010
assert(typeof info.flags === 'object' && info.flags !== null);
11-
assert(Object.keys(info).length > 2); // Assume we are on a known platform
11+
if (process.platform !== 'darwin' && process.arch !== 'arm64')
12+
assert(Object.keys(info).length > 2); // Assume we are on a known platform

0 commit comments

Comments
 (0)