[GH-ISSUE #1268] CLI generate command with --output has incorrect prompt. #8666

Closed
opened 2026-04-13 03:49:25 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @jake-nz on GitHub (Jan 23, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1268

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

When you use --output to specify an output location it works as expected. However the prompt for confirmation is not correct. It asks if you want to use the default location, even though a custom location was specified and is respected.

  1. Run npx @better-auth/cli generate --output ./schema/auth.sql
  • Incorrect prompt shown: "Do you want to generate the schema to ./better-auth_migrations/2025-01-23T01-01-56.548Z.sql"
  1. Accept the prompt
  • File is correctly created at ./schema/auth.sql not ./better-auth_migrations/2025-01-23T01-01-56.548Z.sql

Current vs. Expected behavior

with --output ./schema/auth.sql
Current: The prompt says "Do you want to generate the schema to ./better-auth_migrations/2025-01-23T01-01-56.548Z.sql"
Expected: The prompt says "Do you want to generate the schema to ./schema/auth.sql"

What version of Better Auth are you using?

1.1.14

Provide environment information

- OS: Mac OS

Which area(s) are affected? (Select all that apply)

Other

Auth config (if applicable)


Additional context

No response

Originally created by @jake-nz on GitHub (Jan 23, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1268 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce When you use `--output` to specify an output location it works as expected. However the prompt for confirmation is not correct. It asks if you want to use the default location, even though a custom location was specified and is respected. 1. Run `npx @better-auth/cli generate --output ./schema/auth.sql` * Incorrect prompt shown: "Do you want to generate the schema to ./better-auth_migrations/2025-01-23T01-01-56.548Z.sql" 2. Accept the prompt * File is correctly created at `./schema/auth.sql` not `./better-auth_migrations/2025-01-23T01-01-56.548Z.sql` ### Current vs. Expected behavior with `--output ./schema/auth.sql` **Current**: The prompt says "Do you want to generate the schema to ./better-auth_migrations/2025-01-23T01-01-56.548Z.sql" **Expected**: The prompt says "Do you want to generate the schema to ./schema/auth.sql" ### What version of Better Auth are you using? 1.1.14 ### Provide environment information ```bash - OS: Mac OS ``` ### Which area(s) are affected? (Select all that apply) Other ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-13 03:49:25 -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#8666