Skip to content

Commit

Permalink
run prettier on modules.json after updating all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Dec 13, 2023
1 parent 345afe1 commit 29c87cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nf_core/components/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr
recursive_update = True
modules_to_update, subworkflows_to_update = self.get_components_to_update(component)
if not silent and len(modules_to_update + subworkflows_to_update) > 0:
self.modules_json.load()
self.modules_json.dump(run_prettier=True)
if not self.update_all:
log.warning(
f"All modules and subworkflows linked to the updated {self.component_type[:-1]} will be {'asked for update' if self.show_diff else 'automatically updated'}.\n"
Expand Down Expand Up @@ -326,8 +324,12 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr
)
elif not all_patches_successful and not silent:
log.info(f"Updates complete. Please apply failed patch{plural_es(components_info)} manually.")
self.modules_json.load()
self.modules_json.dump(run_prettier=True)
elif not silent:
log.info("Updates complete :sparkles:")
self.modules_json.load()
self.modules_json.dump(run_prettier=True)

return exit_value

Expand Down

0 comments on commit 29c87cc

Please sign in to comment.