fix: postinstall search path

This commit is contained in:
Isaac 2024-01-14 22:18:39 +00:00
parent db4fd843f4
commit 18e63bf2dc
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -21,7 +21,7 @@ function log(...strings) {
async function npx(cmd) {
const parts = cmd.split(' ');
// fallback for environments with no symlink/npx support (PebbleHost)
if (!fs.existsSync(`./node_modules/.bin/${parts[0]}`)) {
if (!fs.existsSync(pathify(`./node_modules/.bin/${parts[0]}`))) {
const x = parts.shift();
cmd = 'node ' + fallback[x] + ' ' + parts.join(' ');
} else {