mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
add newer syntax to detached HEAD check (#38879)
This commit is contained in:
parent
80d7e22f5e
commit
f072e6c15a
2 changed files with 12 additions and 1 deletions
|
@ -590,7 +590,7 @@ def is_local_branch(git_path, module, dest, branch):
|
|||
def is_not_a_branch(git_path, module, dest):
|
||||
branches = get_branches(git_path, module, dest)
|
||||
for branch in branches:
|
||||
if branch.startswith('* ') and ('no branch' in branch or 'detached from' in branch):
|
||||
if branch.startswith('* ') and ('no branch' in branch or 'detached from' in branch or 'detached at' in branch):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue