server: exit with error code when license is not accepted

This commit is contained in:
Martin Aeschlimann
2022-02-28 22:25:34 +01:00
parent 7e0df7ed8f
commit 1f31835619

View File

@@ -66,16 +66,16 @@ async function start() {
if (product.serverLicensePrompt && parsedArgs['accept-server-license-terms'] !== true) {
if (hasStdinWithoutTty()) {
console.log('To accept the license terms, start the server with --accept-server-license-terms');
process.exit();
process.exit(1);
}
try {
const accept = await prompt(product.serverLicensePrompt);
if (!accept) {
process.exit();
process.exit(1);
}
} catch (e) {
console.log(e);
process.exit();
process.exit(1);
}
}
}