diff --git a/lib/commands/command-help.bash b/lib/commands/command-help.bash index cce31171..00d96a57 100644 --- a/lib/commands/command-help.bash +++ b/lib/commands/command-help.bash @@ -94,18 +94,18 @@ print_plugin_help() { # Eventually @jthegedus or someone else will format the output from these # scripts in a certain way. - bash "${plugin_path}"/bin/help.overview + "${plugin_path}"/bin/help.overview if [ -f "${plugin_path}"/bin/help.deps ]; then - bash "${plugin_path}"/bin/help.deps + "${plugin_path}"/bin/help.deps fi if [ -f "${plugin_path}"/bin/help.config ]; then - bash "${plugin_path}"/bin/help.config + "${plugin_path}"/bin/help.config fi if [ -f "${plugin_path}"/bin/help.links ]; then - bash "${plugin_path}"/bin/help.links + "${plugin_path}"/bin/help.links fi } diff --git a/lib/commands/command-install.bash b/lib/commands/command-install.bash index 89163419..a8c769f0 100644 --- a/lib/commands/command-install.bash +++ b/lib/commands/command-install.bash @@ -169,7 +169,7 @@ install_tool_version() { export ASDF_DOWNLOAD_PATH=$download_path mkdir "$download_path" asdf_run_hook "pre_asdf_download_${plugin_name}" "$full_version" - bash "${plugin_path}"/bin/download + "${plugin_path}"/bin/download ) fi @@ -188,7 +188,7 @@ install_tool_version() { export ASDF_CONCURRENCY=$concurrency mkdir "$install_path" asdf_run_hook "pre_asdf_install_${plugin_name}" "$full_version" - bash "${plugin_path}"/bin/install + "${plugin_path}"/bin/install ) fi diff --git a/lib/commands/command-latest.bash b/lib/commands/command-latest.bash index f08cdcc4..94026184 100644 --- a/lib/commands/command-latest.bash +++ b/lib/commands/command-latest.bash @@ -15,7 +15,7 @@ latest_command() { local versions if [ -f "${plugin_path}/bin/latest-stable" ]; then - versions=$(bash "${plugin_path}"/bin/latest-stable "$query") + versions=$("${plugin_path}"/bin/latest-stable "$query") if [ -z "${versions}" ]; then # this branch requires this print to mimic the error from the list-all branch printf "No compatible versions available (%s %s)\n" "$plugin_name" "$query" >&2 diff --git a/lib/commands/command-list-all.bash b/lib/commands/command-list-all.bash index e3e23d18..f0357a36 100644 --- a/lib/commands/command-list-all.bash +++ b/lib/commands/command-list-all.bash @@ -13,7 +13,7 @@ list_all_command() { # Capture return code to allow error handling std_out_file="$(mktemp "/tmp/asdf-command-list-all-${plugin_name}.stdout.XXXXXX")" std_err_file="$(mktemp "/tmp/asdf-command-list-all-${plugin_name}.stderr.XXXXXX")" - return_code=0 && bash "${plugin_path}/bin/list-all" >"$std_out_file" 2>"$std_err_file" || return_code=$? + return_code=0 && "${plugin_path}/bin/list-all" >"$std_out_file" 2>"$std_err_file" || return_code=$? if [[ $return_code -ne 0 ]]; then # Printing all output to allow plugin to handle error formatting diff --git a/lib/commands/command-plugin-add.bash b/lib/commands/command-plugin-add.bash index 09b05e56..afc1caf7 100644 --- a/lib/commands/command-plugin-add.bash +++ b/lib/commands/command-plugin-add.bash @@ -41,7 +41,7 @@ plugin_add_command() { ( export ASDF_PLUGIN_SOURCE_URL=$source_url export ASDF_PLUGIN_PATH=$plugin_path - bash "${plugin_path}/bin/post-plugin-add" + "${plugin_path}/bin/post-plugin-add" ) fi diff --git a/lib/commands/command-plugin-remove.bash b/lib/commands/command-plugin-remove.bash index 90df543f..e4cee053 100644 --- a/lib/commands/command-plugin-remove.bash +++ b/lib/commands/command-plugin-remove.bash @@ -13,7 +13,7 @@ plugin_remove_command() { if [ -f "${plugin_path}/bin/pre-plugin-remove" ]; then ( export ASDF_PLUGIN_PATH=$plugin_path - bash "${plugin_path}/bin/pre-plugin-remove" + "${plugin_path}/bin/pre-plugin-remove" ) fi diff --git a/lib/commands/command-uninstall.bash b/lib/commands/command-uninstall.bash index 37ae44dd..2e1774f9 100644 --- a/lib/commands/command-uninstall.bash +++ b/lib/commands/command-uninstall.bash @@ -36,7 +36,7 @@ uninstall_command() { export ASDF_INSTALL_TYPE=$install_type export ASDF_INSTALL_VERSION=$version export ASDF_INSTALL_PATH=$install_path - bash "${plugin_path}/bin/uninstall" + "${plugin_path}/bin/uninstall" ) else rm -rf "$install_path" diff --git a/lib/utils.bash b/lib/utils.bash index 721f9da9..ce6aa0b9 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -198,7 +198,7 @@ find_versions() { local legacy_filenames="" if [ "$legacy_config" = "yes" ] && [ -f "$legacy_list_filenames_script" ]; then - legacy_filenames=$(bash "$legacy_list_filenames_script") + legacy_filenames=$($legacy_list_filenames_script) fi while [ "$search_path" != "/" ]; do @@ -329,7 +329,7 @@ parse_legacy_version_file() { if [ -f "$file_path" ]; then if [ -f "$parse_legacy_script" ]; then - bash "$parse_legacy_script" "$file_path" + "$parse_legacy_script" "$file_path" else cat "$file_path" fi @@ -481,7 +481,7 @@ list_plugin_bin_paths() { export ASDF_INSTALL_TYPE=$install_type export ASDF_INSTALL_VERSION=$version export ASDF_INSTALL_PATH=$install_path - bash "${plugin_path}/bin/list-bin-paths" + "${plugin_path}/bin/list-bin-paths" ) else local space_separated_list_of_bin_paths="bin" diff --git a/test/fixtures/dummy_broken_plugin/bin/install b/test/fixtures/dummy_broken_plugin/bin/install old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_broken_plugin/bin/list-all b/test/fixtures/dummy_broken_plugin/bin/list-all old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_legacy_plugin/bin/install b/test/fixtures/dummy_legacy_plugin/bin/install old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_legacy_plugin/bin/list-all b/test/fixtures/dummy_legacy_plugin/bin/list-all old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_legacy_plugin/bin/list-legacy-filenames b/test/fixtures/dummy_legacy_plugin/bin/list-legacy-filenames old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_legacy_plugin/bin/parse-legacy-file b/test/fixtures/dummy_legacy_plugin/bin/parse-legacy-file old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_plugin/bin/help.overview b/test/fixtures/dummy_plugin/bin/help.overview old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_plugin/bin/install b/test/fixtures/dummy_plugin/bin/install old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_plugin/bin/list-all b/test/fixtures/dummy_plugin/bin/list-all old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_plugin/bin/list-legacy-filenames b/test/fixtures/dummy_plugin/bin/list-legacy-filenames old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_plugin/bin/parse-legacy-file b/test/fixtures/dummy_plugin/bin/parse-legacy-file old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_plugin/bin/post-plugin-add b/test/fixtures/dummy_plugin/bin/post-plugin-add old mode 100644 new mode 100755 diff --git a/test/fixtures/dummy_plugin/bin/pre-plugin-remove b/test/fixtures/dummy_plugin/bin/pre-plugin-remove old mode 100644 new mode 100755