1
0
Fork 0
mirror of synced 2024-10-05 20:44:47 +13:00

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 c456e2ad3d
commit c25f88492b

View file

@ -22,6 +22,6 @@ exports.runPkgCommand = async (command, dir = "./") => {
throw new Error("Must have yarn or npm installed to run build.")
}
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)
}