-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Right now we assume that if there's a tasks.cr file, then you must be inside a Lucky app directory
Line 14 in ccaa571
| inside_app_directory = File.file?(tasks_file) |
Then when you run lucky -h you'll get different output depending... This is helpful to avoid an issue where you generate a Lucky app inside of a Lucky app accidentally...
However, Breeze has a tasks.cr file, and is not a Lucky app... so when trying to run the integration specs https://github.com/luckyframework/breeze/blob/674b438fde9da5686a49c9e35290365e45bf9f85/spec/integration_spec.cr#L11 it attempts to build a Lucky app inside of the root of the breeze directory, and instead of just saying "nope", you get
❯ lucky init.custom test-project
Showing last frame. Use --error-trace for full trace.
In lib/avram/src/avram/database.cr:156:5
156 | settings.credentials
^-------
Error: undefined local variable or method 'settings' for Avram::Database+.class
which really makes no sense... Moving this to a tmp/ dir "solves" it...
I do like having the safety of not accidentally generating an app inside an existing app, but I guess is it really necessary vs what we lose not being able to?