Skip to content

Commit bc8ac2a

Browse files
himself65github-actions[bot]
authored andcommitted
fix(cli): cmd info --json unexpected exit with 1 (#6949)
1 parent 5bab61c commit bc8ac2a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/cli/src/commands/info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ async function getBetterAuthInfo(
328328
const config = await getConfig({
329329
cwd: projectRoot,
330330
configPath,
331-
shouldThrowOnError: false,
331+
shouldThrowOnError: true,
332332
});
333333
const packageInfo = await getPackageInfo();
334334
const betterAuthVersion =

packages/cli/src/utils/get-config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export async function getConfig({
197197
configFile: resolvedPath,
198198
dotenv: true,
199199
jitiOptions: jitiOptions(cwd),
200+
cwd,
200201
});
201202
if (!("auth" in config) && !isDefaultExport(config)) {
202203
if (shouldThrowOnError) {
@@ -225,6 +226,7 @@ export async function getConfig({
225226
}>({
226227
configFile: possiblePath,
227228
jitiOptions: jitiOptions(cwd),
229+
cwd,
228230
});
229231
const hasConfig = Object.keys(config).length > 0;
230232
if (hasConfig) {

0 commit comments

Comments
 (0)