Fix keep_local_envs_in_vcs user preference (#6132)

This commit is contained in:
Harshit Ranjan 2025-10-27 18:10:52 +05:30 committed by GitHub
parent 5ee64b4054
commit 2dd227332d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -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 projects .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.

View File

@ -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/*")