Closed scharf closed 1 year ago
Oh my god this needs to be merged and put in a release as soon as possible!
I appreciate the effort but I have no intention of merging this change.
To the best of my knowledge - proposed behavior is not in line with how .env
files are handled by other systems processing them.
Moreover, there is a documented workaround for such a use-case https://github.com/ashald/EnvFile#bash-workaround
That being said, I"d be open to consider alternative ideas how we can support aforementioned usecase. Or if this behavior was protected by a feature toggle.
I'm positive on having this in the plugin, but I think regex is overkill. Given that we strip the line, we should be fine just trimming export
.
Released this in 3.4.0
fixes #102
The lookahead
(?=\\w)
ensures that the pathological case of a variable calledexport
is not accidentally destroyed:export = foo
is not changed by the regex, butexport foo=bar
becomesfoo=bar
.