diff options
author | Anton Onufriev <anufant@gmail.com> | 2016-08-30 12:53:42 +0300 |
---|---|---|
committer | Michael Scherer <mscherer@users.noreply.github.com> | 2016-08-30 11:53:42 +0200 |
commit | 2ca16dfaadaaa40e2003e9e43a499d4a205fb7a7 (patch) | |
tree | ad534d12cd17ff02666ba8d2d7b2ec66c609d09c /source_control/git.py | |
parent | 5310bab12f6013195ac0e770472d593552271b11 (diff) | |
download | ansible-modules-core-2ca16dfaadaaa40e2003e9e43a499d4a205fb7a7.tar.gz |
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.
Diffstat (limited to 'source_control/git.py')
-rw-r--r-- | source_control/git.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source_control/git.py b/source_control/git.py index 82fe94c0..1641eac6 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) |