Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow source argument for update #1729

Open
lhupfeldt opened this issue Aug 9, 2024 · 4 comments
Open

Allow source argument for update #1729

lhupfeldt opened this issue Aug 9, 2024 · 4 comments
Milestone

Comments

@lhupfeldt
Copy link

Actual Situation

The template repository may be moved or renamed, preventing update.
Currently you have to hack the answers file (which is forbidden), and commit it before updating.
Very inconvenient, also during template development when you are working with a locally checked out template and end up with a file system path in a subproject.

Desired Situation

No hacking needed to change template repo location.

Proposed solution

There should be an optional --source argument to point to the new location during update or recopy.

@lhupfeldt lhupfeldt changed the title Allow source arument for update and recopy Allow source argument for update and recopy Aug 9, 2024
@lhupfeldt
Copy link
Author

Related to #335

@yajo
Copy link
Member

yajo commented Aug 10, 2024

Fir recopy, just copy again. Recopy is just a shortcut for that.

In the case of updating, it would make sense.

@yajo yajo changed the title Allow source argument for update and recopy Allow source argument for update Aug 10, 2024
@yajo yajo added this to the Later milestone Aug 10, 2024
@lhupfeldt
Copy link
Author

lhupfeldt commented Aug 11, 2024

Fir recopy, just copy again. Recopy is just a shortcut for that.

In the case of updating, it would make sense.

I would say just very important shortcut. In scenarios where you actually recopy is is not only annoying, but also error prone to have to specify all arguments again. And why would you implement the option for update, but not for recopy at the same time? I would assume the added complexity would be very low, zero or even negative because of more code reuse.
I would also say that the interface would be less confusing to users by having this option on both commands.

@yajo
Copy link
Member

yajo commented Aug 16, 2024

A hypothetical command like this:

copier recopy --src new_src dst

Would be exactly the same as this:

copier copy new_src dst

So, I don't think there's much value on supporting a duplicate feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants