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:
parent
41ea9b9c2a
commit
4ad00d45f8
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue