From 6dc50652c8bcbb1ea352e7a2d1b199fb1ed12223 Mon Sep 17 00:00:00 2001 From: Josh Rabinowitz Date: Fri, 13 Apr 2018 20:58:37 -0400 Subject: [PATCH] fixes for linter errors about 'which' For example: in utils/deb/deb-ci.sh line 27: 'which git-secret': SC2230: which is non-standard. Use builtin 'command -v' instead. --- utils/apk/apk-ci.sh | 3 ++- utils/deb/deb-ci.sh | 3 ++- utils/make/make-ci.sh | 4 +++- utils/rpm/rpm-ci.sh | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/utils/apk/apk-ci.sh b/utils/apk/apk-ci.sh index e0afc6d6..e9107596 100644 --- a/utils/apk/apk-ci.sh +++ b/utils/apk/apk-ci.sh @@ -24,7 +24,8 @@ function integration_tests { # Testing the installation: apk info | grep "git-secret" - which "git-secret" + # lint says to use 'command -v' and not 'which' + command -v "git-secret" # Test the manuals: man --where "git-secret" # .7 diff --git a/utils/deb/deb-ci.sh b/utils/deb/deb-ci.sh index 571003b3..ab734dc5 100644 --- a/utils/deb/deb-ci.sh +++ b/utils/deb/deb-ci.sh @@ -24,7 +24,8 @@ function integration_tests { # Testing the installation: dpkg --get-selections | grep "git-secret" - which "git-secret" + # lint says to use 'command -v' and not 'which' + command -v "git-secret" # Test the manuals: man --where "git-secret" # .7 diff --git a/utils/make/make-ci.sh b/utils/make/make-ci.sh index 61441cb3..6f29594d 100644 --- a/utils/make/make-ci.sh +++ b/utils/make/make-ci.sh @@ -18,7 +18,9 @@ function integration_tests { make install # Testing the installation: - which "git-secret" + # 'command -v' is like 'which' + command -v "git-secret" + # Test the manuals: man --where "git-secret" # .7 diff --git a/utils/rpm/rpm-ci.sh b/utils/rpm/rpm-ci.sh index 1f2e38f6..466f1c6e 100644 --- a/utils/rpm/rpm-ci.sh +++ b/utils/rpm/rpm-ci.sh @@ -24,7 +24,8 @@ function integration_tests { # Testing the installation: dnf info "git-secret" - which "git-secret" + # 'command -v' is like 'which' + command -v "git-secret" # Test the manuals: man --where "git-secret" # .7