mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
server: exit with error code when license is not accepted
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user