Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Fix typo in generators copier.yaml to be able to execute the copier task that informs about successful execution #48

Closed
aorumbayev opened this issue Nov 29, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@aorumbayev
Copy link
Contributor

Current copier yaml on smart contract generator has a typo for tasks definition, _task, but should be _tasks instead.

Somehow this went unnoticed during the initial release of that generator, most likely due to the fact that this task was simple echo and the actual copying behavior worked as expected.

In order to fix it we need to add a few additional handlers into cli repo itself given that (i believe enforced from v9.x of copier) running copy task on any copier yaml with _tasks defined will fail by default, you need to pass --trust flag. Instead prior to running copier cli would need to parse the copier answers file, parse the repo from where it was loaded compare it against blessed templates and then depending on whether its a generator coming from official repo or not it will:

  1. If its official, execute the task as is
  2. If not, execute the task but only if user approves a manual popup that explicitly states that the generator being executed is not official so user must proceed with caution (also adding --trust flag can aid supressing this popup)
@aorumbayev aorumbayev changed the title Fix typo in generators copier.yaml to be able to execute the completion task Fix typo in generators copier.yaml to be able to execute the copier task that informs about successful execution Nov 29, 2023
@aorumbayev aorumbayev added the bug Something isn't working label Nov 29, 2023
@aorumbayev aorumbayev self-assigned this Dec 8, 2023
@aorumbayev
Copy link
Contributor Author

@iskysun96 just fyi, this is fixed in #50 and accompanied by algorandfoundation/algokit-cli#366

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant