Skip to content

Commit

Permalink
fix: use correct v2 tool file during install (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumper authored Feb 9, 2022
1 parent 4cf7ea0 commit 67324f2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/usr/local/bin/install-tool
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [[ -f "$V2_TOOL" ]]; then
# shellcheck source=/dev/null
. /usr/local/buildpack/utils/defaults.sh
# shellcheck source=/dev/null
. "$TOOL"
. "$V2_TOOL"

if ! check_tool_installed; then
echo "Installing tool ${TOOL_NAME} v${TOOL_VERSION}"
Expand All @@ -33,13 +33,9 @@ if [[ -f "$V2_TOOL" ]]; then
echo "Tool ${TOOL_NAME} v${TOOL_VERSION} is already installed"
fi

if [[ "${TOOL_VERSION}" != "$(get_tool_version)" ]]; then
# link the tool
echo "Linking tool ${TOOL_NAME} v${TOOL_VERSION}"
link_tool
else
echo "Tool ${TOOL_NAME} v${TOOL_VERSION} is already linked"
fi
# always link the tool until we have versions available
echo "Linking tool ${TOOL_NAME} v${TOOL_VERSION}"
link_tool
elif [[ -f "$TOOL" ]]; then
echo "Installing legacy tool ${TOOL_NAME} v${TOOL_VERSION}"
# shellcheck source=/dev/null
Expand Down

0 comments on commit 67324f2

Please sign in to comment.