stechstudio / laravel-env-security

Securely manage Laravel .env files for different deployment environments
MIT License
75 stars 9 forks source link

Console\Edit: set environment even when initializing new file #22

Closed bayprogrammer closed 2 years ago

bayprogrammer commented 2 years ago

Ensure that the environment specified by the user when issuing the env:edit command is respected whether or not the environment file is being created anew.

Fixes #20.

bayprogrammer commented 2 years ago

This PR addresses the same underlying problem reported in #20, but here we just move setting the environment to the ::handle() method rather than add it to the write routine.

bayprogrammer commented 2 years ago

@jszobody alright, did a quick smoke test of this approach and it did fix the issue I was having when editing a file anew (and did not break editing a file which was already encrypted that had some content).