wintercms / laravel-config-writer

Utility to create and update Laravel config and .env files
MIT License
12 stars 7 forks source link

EnvFile writer fails to handle comments on the .env file #1

Closed 3m1n3nc3 closed 1 year ago

3m1n3nc3 commented 1 year ago

The EnvFile writer produces inconsistent results when working with commented variables.

The following entry on the .env file:

ENV_KEY="value" #Some comment

Will produce the following results:

ENV_KEY="value #Some comment"

LukeTowers commented 1 year ago

It should work with comments on their own line as a temporary workaround:

#Some comment
ENV_KEY="value"
LukeTowers commented 1 year ago

@jaxwilko are you able to take a look?

jaxwilko commented 1 year ago

@LukeTowers yeah i can take a look tomorrow :)