Skip to content

Commit

Permalink
Fix double assignment of branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikDanielsson committed Aug 5, 2022
1 parent ccdd00d commit 63282dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions nf_core/modules/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def patch(self, module=None):
# Get the module branch and reset it in the ModulesRepo object
module_branch = self.modules_json.get_module_branch(module, self.modules_repo.fullname)
if module_branch != self.modules_repo.branch:
self.modules_repo.branch = module_branch
self.modules_repo.setup_branch()
self.modules_repo.setup_branch(module_branch)

# Set the diff filename based on the module name
patch_filename = f"{module.replace('/', '-')}.diff"
Expand Down
3 changes: 1 addition & 2 deletions nf_core/modules/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ def get_single_module_info(self, module):
switch = questionary.confirm(f"Do you want to update using the '{current_branch}' instead?").unsafe_ask()
if switch:
# Change the branch
self.modules_repo.branch = current_branch
self.modules_repo.setup_branch()
self.modules_repo.setup_branch(current_branch)

# If there is a patch file, get its filename
patch_fn = self.modules_json.get_patch_fn(module, self.modules_repo.fullname)
Expand Down

0 comments on commit 63282dc

Please sign in to comment.