Skip to content

Commit

Permalink
handle missing self.default_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Aug 27, 2024
1 parent 6fc6da2 commit 889e59e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nf_core/pipelines/create/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def get_default_branch(self) -> None:
) # default to main
except configparser.Error:
log.debug("Could not read init.defaultBranch")
if self.default_branch in ["dev", "TEMPLATE"]:
if self.default_branch is not None and self.default_branch in ["dev", "TEMPLATE"]:
raise UserWarning(
f"Your Git defaultBranch '{self.default_branch}' is incompatible with nf-core.\n"
"'dev' and 'TEMPLATE' can not be used as default branch name.\n"
Expand Down

0 comments on commit 889e59e

Please sign in to comment.