diff --git a/src/node/entry.ts b/src/node/entry.ts index e16f8067..62696846 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("")