Skip to content

Commit

Permalink
feat: adapted strategy in order to provide autocompletion scripts in …
Browse files Browse the repository at this point in the history
…install dir, too
  • Loading branch information
log2 committed Jul 29, 2022
1 parent 50379ce commit b7f6124
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ download_release() {
install_version() {
local install_type="$1"
local version="$2"
local install_path="${3%/bin}/bin"
local install_path="${3%/bin}"

if [ "$install_type" != "version" ]; then
fail "asdf-$TOOL_NAME supports release installs only"
fi

(
mkdir -p "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/bin/* "$install_path"
# TODO: Assert step executable exists.
cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path"

local tool_cmd
tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)"
test -x "$install_path/$tool_cmd" || fail "Expected $install_path/$tool_cmd to be executable."
test -x "$install_path/bin/$tool_cmd" || fail "Expected $install_path/bin/$tool_cmd to be executable."

echo "$TOOL_NAME $version installation was successful!"
) || (
Expand Down

0 comments on commit b7f6124

Please sign in to comment.