diff --git a/commands/hubdb/create.ts b/commands/hubdb/create.ts index bb77c8897..a712bcc1e 100644 --- a/commands/hubdb/create.ts +++ b/commands/hubdb/create.ts @@ -51,10 +51,10 @@ exports.handler = async options => { let filePath; try { - const { path: filePath } = + const filePath = 'path' in options ? path.resolve(getCwd(), options.path) - : await selectPathPrompt(options); + : path.resolve(getCwd(), (await selectPathPrompt(options)).path); if (!checkAndConvertToJson(filePath)) { process.exit(EXIT_CODES.ERROR); }