fix(cli): template to works with nix (#1391)

This commit is contained in:
Javier Viola 2022-12-15 10:18:14 -03:00 committed by GitHub
parent 5e9a9ff0b8
commit 36a897e27a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,8 @@ function isMusl() {
// For Node 10 // For Node 10
if (!process.report || typeof process.report.getReport !== 'function') { if (!process.report || typeof process.report.getReport !== 'function') {
try { 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) { } catch (e) {
return true return true
} }