diff --git a/src/node/entry.ts b/src/node/entry.ts index e16f80675..62696846c 100644 --- a/src/node/entry.ts +++ b/src/node/entry.ts @@ -87,7 +87,16 @@ const main = async (args: Args): Promise => { } } -const args = parse(process.argv.slice(2)) +const tryParse = (): Args => { + try { + return parse(process.argv.slice(2)) + } catch (error) { + console.error(error.message) + process.exit(1) + } +} + +const args = tryParse() if (args.help) { console.log("code-server", require("../../package.json").version) console.log("")