Skip to content

Instantly share code, notes, and snippets.

@dentarg
Last active November 4, 2020 10:13
Show Gist options
  • Select an option

  • Save dentarg/83d268c6ae88d24402ae44a8e0aa0825 to your computer and use it in GitHub Desktop.

Select an option

Save dentarg/83d268c6ae88d24402ae44a8e0aa0825 to your computer and use it in GitHub Desktop.
foreman vs dotenv - foreman does not handle inline comments
$ cat .env
TEST1=foo # comment
TEST2='foo' # comment
TEST3="foo" # comment
$ cat env.rb
$stdout.sync = true
puts ENV['TEST1']
puts ENV['TEST1'].inspect
puts
puts ENV['TEST2']
puts ENV['TEST2'].inspect
puts
puts ENV['TEST3']
puts ENV['TEST3'].inspect
$ foreman run ruby env.rb
foo # comment
"foo # comment"
'foo' # comment
"'foo' # comment"
"foo" # comment
"\"foo\" # comment"
$ dotenv ruby env.rb
foo
"foo"
foo
"foo"
foo
"foo"
$ foreman -v
0.87.2
$ dotenv -v
dotenv 2.7.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment