From a707230beb696f8e62b74ed4a6536fe8848faa6b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 29 Sep 2021 21:04:13 -0700 Subject: replace use of which(1) with call to 'command' shell builtin This should be more portable, as 'command -v' is specified by POSIX. Signed-off-by: Sean Whitton --- Changes | 2 ++ t/lib/t/Util.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 3d7133a..58030c0 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Git::Annex {{$NEXT}} + - Test suite: use 'command' shell builtin, rather than which(1), to + determine whether git-annex is available on PATH. 0.007 2021-02-28 13:20:42-07:00 America/Phoenix - Rename annex-review-unused to git-annex-reviewunused now that git-annex diff --git a/t/lib/t/Util.pm b/t/lib/t/Util.pm index dea6a42..df324ce 100644 --- a/t/lib/t/Util.pm +++ b/t/lib/t/Util.pm @@ -42,7 +42,7 @@ sub device_id_issues { } sub git_annex_available { - `which git-annex`; + `sh -c "command -v git-annex"`; return !$?; } -- cgit v1.2.3