diff --git a/docs/1-getting-started/project-generation-options.rst b/docs/1-getting-started/project-generation-options.rst index 3ed38cbcd..7e2a23476 100644 --- a/docs/1-getting-started/project-generation-options.rst +++ b/docs/1-getting-started/project-generation-options.rst @@ -136,10 +136,8 @@ ci_tool: 5. `Drone CI`_ keep_local_envs_in_vcs: - Indicates whether the project's ``.envs/.local/`` should be kept in VCS - (comes in handy when working in teams where local environment reproducibility - is strongly encouraged). - Note: .env(s) are only utilized when Docker Compose and/or Heroku support is enabled. + +Indicates whether the project’s .envs/.local/ should be kept in VCS (comes in handy when working in teams where local environment reproducibility is strongly encouraged). debug: Indicates whether the project should be configured for debugging. diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 7e3ee9d3c..e35c97486 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -450,10 +450,11 @@ def main(): # noqa: C901, PLR0912, PLR0915 if "{{ cookiecutter.keep_local_envs_in_vcs }}".lower() == "y": print( INFO + ".env(s) are only utilized when Docker Compose and/or " - "Heroku support is enabled so keeping them does not make sense " - "given your current setup." + TERMINATOR, + "Heroku support is enabled. Keeping them as requested, but they may not be useful " + "in your current setup." + TERMINATOR, ) - remove_envs_and_associated_files() + else: + remove_envs_and_associated_files() else: append_to_gitignore_file(".env") append_to_gitignore_file(".envs/*")