Skip to content

Commit fbc36f9

Browse files
mgornyByron
authored andcommitted
tests: Use command -v instead of third-party which program
Use `command -v` to locate the git executable instead of `which`. The former is guaranteed to always be available according to POSIX, while which(1) is a redundant third-party tool that is slowly being phased out from Linux distributions. In particular, Gentoo no longer installs it by default.
1 parent 4463624 commit fbc36f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: test/test_git.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def test_refresh(self):
169169
self.assertRaises(GitCommandNotFound, refresh, "yada")
170170

171171
# test a good path refresh
172-
which_cmd = "where" if is_win else "which"
172+
which_cmd = "where" if is_win else "command -v"
173173
path = os.popen("{0} git".format(which_cmd)).read().strip().split("\n")[0]
174174
refresh(path)
175175

0 commit comments

Comments
 (0)