Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support to .env file #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hugocorbucci
Copy link

It is very interesting for development environments to be able to use local .env files that hold environment variables that will be used by gaffer.
Tried adding it in. The tests are not fantastic and I hope to make them better if you can provide me with some guidance around what you're looking for.

try {
final Map<String, Integer> concurrency = ConcurrencyFlagParser.parse(flagConcurrency);
final Procfile pf = Procfile.read(path);
new ProcessManager().start(pf, process, concurrency, flagPort);
final Environment env = Environment.read(envPath);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should ignore the .env file if it doesn't exist instead of throwing exception. That's how foreman or forego work.

@hugocorbucci
Copy link
Author

Alright, so I just swallow the exception and return an empty environment if I can't find the .env file. Is that good?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants