Fix extension install path for CLI

Closes #1713
This commit is contained in:
Anmol Sethi 2020-05-26 23:20:12 -04:00
parent 3140a0cb15
commit 9d0dcf3c44
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB

View File

@ -43,8 +43,6 @@ const main = async (cliArgs: Args): Promise<void> => {
} }
} }
args = await setDefaults(args)
logger.info(`Using user-data-dir ${humanPath(args["user-data-dir"])}`) logger.info(`Using user-data-dir ${humanPath(args["user-data-dir"])}`)
logger.trace(`Using extensions-dir ${humanPath(args["extensions-dir"])}`) logger.trace(`Using extensions-dir ${humanPath(args["extensions-dir"])}`)
@ -129,9 +127,11 @@ const main = async (cliArgs: Args): Promise<void> => {
} }
async function entry(): Promise<void> { async function entry(): Promise<void> {
const tryParse = (): Args => { const tryParse = async (): Promise<Args> => {
try { try {
return parse(process.argv.slice(2)) let args = parse(process.argv.slice(2))
args = await setDefaults(args)
return args
} catch (error) { } catch (error) {
console.error(error.message) console.error(error.message)
process.exit(1) process.exit(1)