Skip to content

Conversation

slashformotion
Copy link

goal: provide an informative .env.dist files to fill out directly by the different teams that are using the software configured using environment variables.

why I am not using the existing dotenv format ? the dotenv format has some # before the env vars. This makes some teams at my workplace wonder what they should uncomment.

the goal of this format is to provide an informative .env.dist files to fill out by the different teams that are using the software configured using environment variables
@g4s8
Copy link
Owner

g4s8 commented Oct 3, 2025

Thanks for submitting! Changes look reasonable, but these two formats for dotenv and dotenv.dist look very similar. So I would add some additional flag for dotenv as a format option instead of creating a new format. E.g. when the -dist flag is present, then the dotenv format renders env variable names without comment. What do you think about this?

@slashformotion
Copy link
Author

LGTM, I will look into implementing it

@slashformotion
Copy link
Author

After tinkering a little bit, I think it's way easier to just introduce a new template, passing a flag value will probably be fine for one flag, but with time it will be a mess if more flags are added.

An alternative would be to support custom templates, but it's probably another can of worm.

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