Update exec.js

I had an issue where the datasource plugin wouldn't work because of node engine incompatibility, and after a quick search on google I found that --ignore-engines is the option to use for ignoring this kind of error and it worked! So I want to make this a built-in feature so there's no need for me to manually do this.
This commit is contained in:
rosnerdev 2022-10-04 12:18:04 +03:00 committed by GitHub
parent 41ea9b9c2a
commit 4ad00d45f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -22,6 +22,6 @@ exports.runPkgCommand = async (command, dir = "./") => {
throw new Error("Must have yarn or npm installed to run build.") throw new Error("Must have yarn or npm installed to run build.")
} }
const npmCmd = command === "install" ? `npm ${command}` : `npm run ${command}` const npmCmd = command === "install" ? `npm ${command}` : `npm run ${command}`
const cmd = yarn ? `yarn ${command}` : npmCmd const cmd = yarn ? `yarn ${command} --ignore-engines` : npmCmd
await exports.exec(cmd, dir) await exports.exec(cmd, dir)
} }