Remove duplicate mkdir calls in install_tool_version function

This commit is contained in:
Trevor Brown 2020-05-04 10:51:07 -04:00
parent ac62c7c4d4
commit a886303065

View File

@ -116,6 +116,8 @@ install_tool_version() {
echo "$plugin_name $full_version is already installed"
else
mkdir "$install_path"
if [ -f "${plugin_path}/bin/download" ]; then
# Not a legacy plugin
# Run the download script
@ -124,7 +126,6 @@ install_tool_version() {
export ASDF_INSTALL_VERSION=$version
export ASDF_INSTALL_PATH=$install_path
export ASDF_DOWNLOAD_PATH=$download_path
mkdir "$install_path"
asdf_run_hook "pre_asdf_download_${plugin_name}" "$full_version"
bash "${plugin_path}"/bin/download
)
@ -136,7 +137,6 @@ install_tool_version() {
export ASDF_INSTALL_PATH=$install_path
export ASDF_DOWNLOAD_PATH=$download_path
export ASDF_CONCURRENCY=$concurrency
mkdir "$install_path"
asdf_run_hook "pre_asdf_install_${plugin_name}" "$full_version"
bash "${plugin_path}"/bin/install
)