DarthSim / overmind

Process manager for Procfile-based applications and tmux
MIT License
2.84k stars 79 forks source link

.env file parsing and escape characters/interpolation #44

Closed matsrietdijk closed 5 years ago

matsrietdijk commented 5 years ago

After upgrading from 1.1.1 to 1.2.1 environment variables are parsed differently (incorrectly?).

Environment variables enclosed by single quotes (') would not be subject to interpolation in 1.1.1 but are in 1.2.1, eg:

#.env
A='VALUE'
B='$A'

With 1.1.1:

> echo $A
STRING
> echo $B
$A

With 1.2.1:

> echo $A
STRING
> echo $B
STRING

The issue I experience is that most other .env parsers do not interpolate on a single quote enclosed value. So for instance running a Ruby on Rails application with overmind or just rails s result in the application being run with different environment variables.

DarthSim commented 5 years ago

It was a bug in github.com/joho/godotenv. Fixed in v2.0