Skip to content

Commit

Permalink
Fetch template if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankpatibandla committed Apr 28, 2024
1 parent 2619087 commit 47944ac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pros/conductor/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,16 @@ def apply_template(self, project: Project, identifier: Union[str, BaseTemplate],
force_user=kwargs.pop('force_user', False),
remove_empty_directories=kwargs.pop('remove_empty_directories', False))
ui.finalize('apply', f'Finished applying {template.identifier} to {project.location}')

# Apply liblvgl if upgrading to PROS 4
if apply_liblvgl:
self.apply_template(project=project, identifier="liblvgl")
template = self.resolve_template(identifier="liblvgl", allow_online=download_ok, early_access=True)
if not isinstance(template, LocalTemplate):
with ui.Notification():
template = self.fetch_template(self.get_depot(template.metadata['origin']), template, **kwargs)
assert isinstance(template, LocalTemplate)
project.apply_template(template)
ui.finalize('apply', f'Finished applying {template.identifier} to {project.location}')
elif valid_action != TemplateAction.AlreadyInstalled:
raise dont_send(
InvalidTemplateException(f'Could not install {template.identifier} because it is {valid_action.name},'
Expand Down

0 comments on commit 47944ac

Please sign in to comment.