Skip to content

Commit

Permalink
fix: typo glibcRuntimeVersion glibcVersionRuntime (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
snyamathi committed Apr 12, 2023
1 parent f18d5b0 commit 7a93622
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const checkPlatform = (target, force = false) => {
libcOk = false
} else {
const report = process.report.getReport()
if (report.header?.glibcRuntimeVersion) {
if (report.header?.glibcVersionRuntime) {
libcFamily = 'glibc'
} else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) {
libcFamily = 'musl'
Expand Down
4 changes: 2 additions & 2 deletions test/check-platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ t.test('libc', (t) => {

REPORT = { header: {} }
t.throws(() => checkPlatform({ libc: 'glibc' }), { code: 'EBADPLATFORM' },
'fails when header is missing glibcRuntimeVersion property')
'fails when header is missing glibcVersionRuntime property')

REPORT = { header: { glibcRuntimeVersion: '1' } }
REPORT = { header: { glibcVersionRuntime: '1' } }
t.doesNotThrow(() => checkPlatform({ libc: 'glibc' }), 'allows glibc on glibc')
t.throws(() => checkPlatform({ libc: 'musl' }), { code: 'EBADPLATFORM' },
'does not allow musl on glibc')
Expand Down

0 comments on commit 7a93622

Please sign in to comment.