From fbc36f9cefa3a7e150187dabf8758a53062c5b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 31 Dec 2022 08:07:51 +0100 Subject: 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. --- test/test_git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_git.py b/test/test_git.py index e7d236de..c5d871f0 100644 --- a/test/test_git.py +++ b/test/test_git.py @@ -169,7 +169,7 @@ class TestGit(TestBase): self.assertRaises(GitCommandNotFound, refresh, "yada") # test a good path refresh - which_cmd = "where" if is_win else "which" + which_cmd = "where" if is_win else "command -v" path = os.popen("{0} git".format(which_cmd)).read().strip().split("\n")[0] refresh(path) -- cgit v1.2.1