fix(cli): template to works with nix (#1391)
This commit is contained in:
parent
5e9a9ff0b8
commit
36a897e27a
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue