-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Currently Copier's logic[1][2] when running updates is to always pull the template path from the answers file in the project. The nava-platform infra
commands support a --template-uri
option to say which template source to use, but this currently has no impact. So we could drop that option from the update commands or, more usefully, hook into copier's "subproject" logic[3] to override the src_path
to the returned Template
to be the path passed as a CLI argument. More hackily, could just write the new src_path
to the answers file before running Copier.
The current limitation likely impacts template authors (who may want to run test updates from a locally modified template repo when the project is configured to use a remote URL) more so than users, but could get users into frustrating situations if different people are running updates from different paths (e.g., from within the project repo vs one level above) and hitting errors.
[1] https://github.com/copier-org/copier/blob/19156ee3be576a72ba8603137b25e227fde28021/copier/subproject.py#L75-L78
[2] https://github.com/copier-org/copier/blob/9ddee994722bc523c4c3550ba0f33742cd6bf168/copier/main.py#L934
[3] https://github.com/copier-org/copier/blob/9ddee994722bc523c4c3550ba0f33742cd6bf168/copier/main.py#L780