Remove colors from git-branch output for correct local search (#4545)
We got an error while switching on existent local branch because git module can not find branch in function get_branches if we have color.branch=always in git config.
This commit is contained in:
parent
ee5a48b84d
commit
f5f1062d72
1 changed files with 1 additions and 1 deletions
|
@ -490,7 +490,7 @@ def is_remote_tag(git_path, module, dest, remote, version):
|
|||
|
||||
def get_branches(git_path, module, dest):
|
||||
branches = []
|
||||
cmd = '%s branch -a' % (git_path,)
|
||||
cmd = '%s branch --no-color -a' % (git_path,)
|
||||
(rc, out, err) = module.run_command(cmd, cwd=dest)
|
||||
if rc != 0:
|
||||
module.fail_json(msg="Could not determine branch data - received %s" % out, stdout=out, stderr=err)
|
||||
|
|
Loading…
Reference in a new issue