mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 21:42:05 +00:00
Do not use process.exit, throw instead
This commit is contained in:
parent
6cff34ae3c
commit
935d7c15a4
1 changed files with 7 additions and 6 deletions
|
|
@ -18,12 +18,13 @@ var major = parseInt(v[0]),
|
||||||
patch = parseInt(v[2]);
|
patch = parseInt(v[2]);
|
||||||
|
|
||||||
if((major == 0 && minor < 12) || (major == 0 && minor == 12 && patch < 7)) {
|
if((major == 0 && minor < 12) || (major == 0 && minor == 12 && patch < 7)) {
|
||||||
console.log("discord.js doesn't support node versions less than 0.12.7.");
|
if(!env.OVERRIDE_DISCORD_MIN_VERSION) {
|
||||||
console.log("If you /really/ want to run it on this node (" +
|
throw new Error(
|
||||||
process.version + "), then remove the check from entrypoint.js.");
|
`discord.js doesn't support node versions less than 0.12.7.
|
||||||
console.log("However, this is unsupported and WILL cause problems.");
|
If you /really/ want to run it on this node (${process.version}), then set OVERRIDE_DISCORD_MIN_VERSION as enviroment variable.
|
||||||
console.log("Exiting now.");
|
However, this is unsupported and WILL cause problems`.replace(/\t/g, '')
|
||||||
process.exit(1);
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// at the moment no node version has full ES6 support
|
// at the moment no node version has full ES6 support
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue