Skip to content

Commit

Permalink
feat: update musl logic with node-rs packages (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
richerfu committed May 9, 2023
1 parent 1b672a7 commit 588790d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ function isMusl() {
// For Node 10
if (!process.report || typeof process.report.getReport !== 'function') {
try {
return readFileSync('/usr/bin/ldd', 'utf8').includes('musl')
const lddPath = require('child_process').execSync('which ldd').toString().trim()
return readFileSync(lddPath, 'utf8').includes('musl')
} catch (e) {
return true
}
Expand Down

0 comments on commit 588790d

Please sign in to comment.