[PR #6949] [MERGED] fix(cli): cmd info --json unexpected exit with 1 #23884

Closed
opened 2026-04-15 22:02:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6949
Author: @himself65
Created: 12/23/2025
Status: Merged
Merged: 12/23/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/12/23/cli-exit


📝 Commits (1)

  • b503a9a fix(cli): cmd info --json unexpected exit with 1

📊 Changes

2 files changed (+3 additions, -1 deletions)

View changed files

📝 packages/cli/src/commands/info.ts (+1 -1)
📝 packages/cli/src/utils/get-config.ts (+2 -0)

📄 Description

reported from https://github.com/better-auth/better-auth/issues/6944


Summary by cubic

Fixes the CLI command info --json unexpectedly exiting with code 1 by loading the config with the correct cwd and failing fast on invalid configs. The command now returns reliable JSON output.

  • Bug Fixes
    • Pass cwd to loadConfig for correct config resolution.
    • Set shouldThrowOnError: true in info to surface config errors early.

Written for commit b503a9aecb. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6949 **Author:** [@himself65](https://github.com/himself65) **Created:** 12/23/2025 **Status:** ✅ Merged **Merged:** 12/23/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/12/23/cli-exit` --- ### 📝 Commits (1) - [`b503a9a`](https://github.com/better-auth/better-auth/commit/b503a9aecbc8e13045d80d0eb4b0da48e40e1d1b) fix(cli): cmd `info --json` unexpected exit with 1 ### 📊 Changes **2 files changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/cli/src/commands/info.ts` (+1 -1) 📝 `packages/cli/src/utils/get-config.ts` (+2 -0) </details> ### 📄 Description reported from https://github.com/better-auth/better-auth/issues/6944 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the CLI command `info --json` unexpectedly exiting with code 1 by loading the config with the correct cwd and failing fast on invalid configs. The command now returns reliable JSON output. - **Bug Fixes** - Pass `cwd` to `loadConfig` for correct config resolution. - Set `shouldThrowOnError: true` in `info` to surface config errors early. <sup>Written for commit b503a9aecbc8e13045d80d0eb4b0da48e40e1d1b. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:02:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#23884