mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
When running `bun init` in a non-empty directory in TTY mode, users are now presented with an interactive prompt asking whether to: 1. Create in a new subdirectory (default) 2. Use the current directory (may overwrite files) 3. Cancel This prevents accidental file creation in wrong directories and provides a better UX, similar to tools like `create-next-app`. The prompt is only shown when: - No folder was explicitly specified as an argument - stdin is a TTY (not piped input) - Not using auto-yes flags (-y, --react, etc.) - The directory is not empty (ignores .DS_Store and Thumbs.db) Fixes #24555 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>