Skip to content
New issue

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

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

Already on GitHub? # to your account

Support for copier.yaml files that include other files #83

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pytest_copie/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def copy(self, extra_answers: dict = {}, template_dir: Optional[Path] = None) ->
try:

# make sure the copiercopier project is using subdirectories
params = yaml.safe_load(copier_yaml.read_text())
if "_subdirectory" not in params:
all_params = yaml.safe_load_all(copier_yaml.read_text())
if not any("_subdirectory" in params for params in all_params):
raise ValueError(
"The plugin can only work for templates using subdirectories, "
'"_subdirectory" key is missing from copier.yaml'
Expand Down