From 8e23f757d28da884488da71b3bf9f6a563efb1b9 Mon Sep 17 00:00:00 2001 From: Ivan Valdes Date: Wed, 5 Jul 2023 10:45:08 -0700 Subject: [PATCH] fix: set proper ShellCheck source for utils.bash The ShellCheck directive currently points to `../lib/utils.bash`. However, this raises an info log, as ShellCheck is not able to open the file. As the linter runs from the top level of the repository, the right path should be `./lib/utils.bash`. In bin/install line 9: source "${plugin_dir}/lib/utils.bash" ^----------------------------^ SC1091 (info): Not following: ../lib/utils.bash: openBinaryFile: does not exist (No such file or directory) --- template/bin/download | 2 +- template/bin/install | 2 +- template/bin/latest-stable | 2 +- template/bin/list-all | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/template/bin/download b/template/bin/download index b104db2..c11ee53 100755 --- a/template/bin/download +++ b/template/bin/download @@ -5,7 +5,7 @@ set -euo pipefail current_script_path=${BASH_SOURCE[0]} plugin_dir=$(dirname "$(dirname "$current_script_path")") -# shellcheck source=../lib/utils.bash +# shellcheck source=./lib/utils.bash source "${plugin_dir}/lib/utils.bash" mkdir -p "$ASDF_DOWNLOAD_PATH" diff --git a/template/bin/install b/template/bin/install index 9737a63..6ca759a 100755 --- a/template/bin/install +++ b/template/bin/install @@ -5,7 +5,7 @@ set -euo pipefail current_script_path=${BASH_SOURCE[0]} plugin_dir=$(dirname "$(dirname "$current_script_path")") -# shellcheck source=../lib/utils.bash +# shellcheck source=./lib/utils.bash source "${plugin_dir}/lib/utils.bash" install_version "$ASDF_INSTALL_TYPE" "$ASDF_INSTALL_VERSION" "$ASDF_INSTALL_PATH" diff --git a/template/bin/latest-stable b/template/bin/latest-stable index b9a01c3..818f26e 100755 --- a/template/bin/latest-stable +++ b/template/bin/latest-stable @@ -5,7 +5,7 @@ set -euo pipefail current_script_path=${BASH_SOURCE[0]} plugin_dir=$(dirname "$(dirname "$current_script_path")") -# shellcheck source=../lib/utils.bash +# shellcheck source=./lib/utils.bash . "${plugin_dir}/lib/utils.bash" curl_opts=(-sI) diff --git a/template/bin/list-all b/template/bin/list-all index 943371e..9b8b666 100755 --- a/template/bin/list-all +++ b/template/bin/list-all @@ -5,7 +5,7 @@ set -euo pipefail current_script_path=${BASH_SOURCE[0]} plugin_dir=$(dirname "$(dirname "$current_script_path")") -# shellcheck source=../lib/utils.bash +# shellcheck source=./lib/utils.bash source "${plugin_dir}/lib/utils.bash" list_all_versions | sort_versions | xargs echo