DarthSim / overmind

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

Allow to optionally disable loading of .env entirely #43

Closed piotrb closed 5 years ago

piotrb commented 5 years ago

This is a potential fix for #42

This does two things ..

  1. refactor the .env reading so it loads the .overmind.env files first, checks for OVERMIND_SKIP_ENV, if its set, it SKIPS loading .env and then if OVERMIND_ENV is specified it will load that too
  2. Change a bunch of imports to not reference github.com/DarthSim/overmind, but use relative paths instead since that was making it hard to actually build this thing locally. I'm not sure why the complete paths were used, I suppose if you place this in your $GOPATH properly it might work, but on a fork it already doesn't quite fit, unless there was a good reason for it, it seems like the relative paths are more flexible anyways.
DarthSim commented 5 years ago

Since we're going to check OVERMIND_SKIP_ENV before loading .env it's better to load file from OVERMIND_ENV before the check.

piotrb commented 5 years ago

I'd agree with the ordering change on principle, but it makes the reason I put this change in even more apparent ;)

You can't even use OVERMIND_ENV to load .env.local as a way of overriding what is loaded from .env if the ordering is changed.

DarthSim commented 5 years ago

Thanks for your contribution! Released in v2.0.1