raise a specific exception when a task fails
Actual Situation
when a task fails, copier raises subprocess.CalledProcessError.
Desired Situation
raise a specific exception, such as TaskFailed this will allow user or external tools that run copier to separate between exceptions caused by tasks, and those caused by code issues.
Proposed solution
in copier/main.py:369, replace the subprocess internal check with code that checks the return code and raises TaskFailed with the task command and task returncode.
I can write the code if needed.
Sounds good to me. :+1: Please feel free to submit a PR.
Perhaps we can call the exception TaskError?
i can go with any name :). notice that if the task is a linter / checker, it might return 1 when it means "i found issues in your code" and not "i failed to run"