Copier update not working properly under a conditional directory #885
Unanswered
guillemrbaiges
asked this question in
Q&A
Replies: 1 comment
-
I'm not sure I understand fully the case but in case it's a bug in copier you're probably hitting some corner case that hasn't been tested so far. If there was a way to get reproduction steps, that'd help a lot in proper diagnose. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The context is as follows
Given:
{% if copier_bool_variable %}directory_name{% endif %}
copier update
callExpected:
copier update --force --data ...
(as per your documentation)What happens:
Weirdly, if I ignore all recommendations and warnings and I manually add the missing questions in the
copier-answers
file, then this behaviour does not happen and I get the 4 files I was expecting. I don't remember if this strategy ended up working, as I recall at some points the expected changes appeared mid-update and then disappeared (I can't replicate this right now as this is an ongoing collaboration with one of our clients), but I'm 100% sure that the weird behaviour described above (files wrongly removed) does not happen when I manually modify thecopier-answers
file to add the new questions, instead of passing them through the--data
command.Let me know if you need more information on the issue, I've mentioned my two main suspicions (different questions to the ones in the latest version + update under a directory whose name uses Copier's conditional syntax) to see if this rings a bell for you. Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions