-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support .env.template if no .env.sample #65
Conversation
@@ -73,15 +73,19 @@ For more information check this [page](https://docs.docker.com/compose/environme | |||
The workaround is to rename your `.env` file when using docker. [Here](https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use) you'll find all naming options acceptable for dotenv and that Docker will not automatically parse. | |||
|
|||
If renaming is not an option, then you need to remove any comments or trailing whitespaces from your `.env` file: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, below this line it was just the formatter in this file, I can remove that if needed
@@ -4,13 +4,18 @@ | |||
let(:sample_lines) { StringIO.new("") } | |||
|
|||
before do | |||
allow(File).to receive(:exist?).and_return(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arielj Looks good, thanks!
CHANGELOG.md
that links to this PR under the "main (unreleased)" heading.Description:
This PRs adds a fallback to also support
.env.template
if.env.sample
is not present. The.env.template
file is created by dotenv itself when using thedotenv -t .env
command, so it's important to support it since many users of dotenv could be using that instead of.env.sample
. https://github.com/bkeepers/dotenv/tree/master#should-i-commit-my-env-fileThis fixes #63
I had to refactor the tests a big to be able to test this better.
I will abide by the code of conduct.