framework
framework copied to clipboard
[10.x] Fix env:decrypt output path
This PR attempts to resolve issues raised in #4940.
When using a .env.testing file and explicitly setting the environment at the system level like so:
APP_ENV=testing php artisan env:decrypt
The command will find the encrypted .env.testing due to the use of $this->laravel->environmentFilePath() to resolve the current environment file.
However, when writing the file, this was not taken into account so it would be written to .env instead of .env.testing.
This PR uses the environment filepath established earlier in the command to keep things consistent.