Tecnativa / doodba-copier-template

A Copier template for Doodba projects
Boost Software License 1.0
86 stars 114 forks source link

Copier update: backup.env overwritten #275

Open sgheller opened 3 years ago

sgheller commented 3 years ago

Describe the bug

After copier update, pre-existing aws credentials and backup passphrase are overwritten in .docker/backup.env. Credentials defaults to null and are deleted from the env file. Passphrase changes to "example-backup-passphrase". Because .docker/ is gitignored, this changes may go unnoticed.

To Reproduce

Steps to reproduce the behavior:

  1. Use copier update to add my aws credentials and backup passphrase
  2. Use copier update to update the project when there are changes in this template
  3. Skip copier questions about backup credentials and passphrase

Expected behavior: Docs state that default values will be those you answered last time. If I don't want to change credentials and passphrase then when I press enter I expect them not to change.

yajo commented 3 years ago

The fix would be simple:

  1. Add .docker/* to _skip_if_exists in copier.yml.
  2. Add a test asserting that this works fine.

PRs welcome.