Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BF(WIN): use where instead of which while looking for git
  • Loading branch information
yarikoptic committed Nov 28, 2017
commit b4459ca7fd21d549a2342a902cfdeba10c76a022
5 changes: 4 additions & 1 deletion git/test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
except ImportError:
import mock

from git.compat import is_win


class TestGit(TestBase):

Expand Down Expand Up @@ -177,7 +179,8 @@ def test_refresh(self):
self.assertRaises(GitCommandNotFound, refresh, "yada")

# test a good path refresh
path = os.popen("which git").read().strip()
which_cmd = "where" if is_win else "which"
path = os.popen("{0} git".format(which_cmd)).read().strip()
refresh(path)

def test_options_are_passed_to_git(self):
Expand Down