diff --git a/src/node/entry.ts b/src/node/entry.ts index cec2a13cf336db1de3d7eaeb41b3828a0ae44e15..96db046e2fb11d6137dd7f2b321518634df95e77 100644 --- a/src/node/entry.ts +++ b/src/node/entry.ts @@ -240,16 +240,11 @@ const main = async (args: Args, configArgs: Args): Promise => { } async function entry(): Promise { - const tryParse = async (): Promise<[Args, Args, Args]> => { - const cliArgs = parse(process.argv.slice(2)) - const configArgs = await readConfigFile(cliArgs.config) - // This prioritizes the flags set in args over the ones in the config file. - let args = Object.assign(configArgs, cliArgs) - args = await setDefaults(args) - return [args, cliArgs, configArgs] - } - - const [args, cliArgs, configArgs] = await tryParse() + const cliArgs = parse(process.argv.slice(2)) + const configArgs = await readConfigFile(cliArgs.config) + // This prioritizes the flags set in args over the ones in the config file. + let args = Object.assign(configArgs, cliArgs) + args = await setDefaults(args) // There's no need to check flags like --help or to spawn in an existing // instance for the child process because these would have already happened in