From 2ca16dfaadaaa40e2003e9e43a499d4a205fb7a7 Mon Sep 17 00:00:00 2001 From: Anton Onufriev Date: Tue, 30 Aug 2016 12:53:42 +0300 Subject: [PATCH] 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. --- source_control/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source_control/git.py b/source_control/git.py index 82fe94c0403..1641eac6498 100644 --- a/source_control/git.py +++ b/source_control/git.py @@ -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)