From 36a897e27a6093be69710f8c61dfbea29975cb9b Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Thu, 15 Dec 2022 10:18:14 -0300 Subject: [PATCH] fix(cli): template to works with nix (#1391) --- cli/src/js-binding-template.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/js-binding-template.ts b/cli/src/js-binding-template.ts index 1b2659e6..1aedb6b7 100644 --- a/cli/src/js-binding-template.ts +++ b/cli/src/js-binding-template.ts @@ -14,7 +14,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 }