Skip to content

Commit b0646d3

Browse files
committed
Use POSIX approach to get effective executable path in install script
The installation script checks the path of the effective executable after installing the application. If it is different from the installation path, it warns the user. Previously, the external tool `which` was used for this purpose. This is a violation of ShellCheck rule C2230, which results in an error with the version of ShellCheck installed in the GitHub Actions runner (0.7.0). The installation script is intended to use POSIX standard tools where possible in order to be as portable as possible. The recommended replacement `command -v` works equally as well for this particular application, so there is no reason not to make the change recommended by ShellCheck. Reference: https://github.com/koalaman/shellcheck/wiki/SC2230
1 parent 8379743 commit b0646d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etc/install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ bye() {
195195

196196
testVersion() {
197197
set +e
198-
ARDUINO_LINT="$(which $PROJECT_NAME)"
198+
ARDUINO_LINT="$(command -v $PROJECT_NAME)"
199199
if [ "$?" = "1" ]; then
200200
# $PATH is intentionally a literal in this message.
201201
# shellcheck disable=SC2016

0 commit comments

Comments
 (0)