Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --no-interaction SQLite file prompt #354

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

jacksleight
Copy link
Contributor

Fixes #352

This prompt comes from the migrate command, and by the looks of that the only way to ensure the SQLite file is created without a prompt is to add --force. Adding --no-interaction to migrate results in no file being created, which then errors when the migrations run.

Hopefully this is OK but let me know if you'd like any changes.

src/NewCommand.php Outdated Show resolved Hide resolved
@taylorotwell taylorotwell merged commit db5f79d into laravel:master Aug 22, 2024
10 checks passed
@jacksleight jacksleight deleted the fix/no-interaction-sqlite branch August 22, 2024 07:04
@stancl
Copy link

stancl commented Aug 30, 2024

(Disregard, issue was somewhere else, see linked issue below)

Not sure if I'm doing something wrong, but even on laravel/installer:dev-master I'm getting

The SQLite database configured for this application does not exist: database/database.sqlite.

with:

laravel new --no-interaction --git --jet --stack=livewire --api --verification --pest --database=sqlite test

Also, --force having an effect here seems wrong since the --help comment for --force is:

Forces install even if the directory already exists

So that behavior should all be under --no-interaction.

Either way, on the latest dev-master, the command above prompts me for both creating the DB and re-running migrations, and --force doesn't change anything 🤷🏻‍♂️

Confirmed with composer global show laravel/installer that I'm using the right commit:

source   : [git] https://github.com/laravel/installer.git db5f79dda5bd9b84c0777da435d2147c5caa4068

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running with --no-interaction still prompts about SQLite file
4 participants