fly-apps / fly-laravel

Run your Laravel apps on Fly
40 stars 3 forks source link

When reusing an app name, the error output shows a lot of debug statements as well #20

Open Johannes-Werbrouck opened 1 year ago

Johannes-Werbrouck commented 1 year ago

Not sure if this is a flyctl issue or not

fideloper commented 1 year ago

This is a fun one, I've hit it before - Laravel's .env has LOG_LEVEL=debug set in it. Laravel therefore sets LOG_LEVEL as en environment variable (via the DotEnv package that comes with Laravel). That env var gets passed down to flyctl when run via Process::run() (since parent process env vars are passed to child processes when running a command).

Then flyctl outputs a bunch of stuff - since it uses LOG_LEVEL as well by coincidence.

So one idea is to unset the LOG_LEVEL env var when calling flyctl via Process::run().