diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3781f3b..4ee3577 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,13 +21,16 @@ jobs: with: command: asdf-plugin-manager version - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 - - name: Install asdf-plugin-manager + - name: Test asdf-plugin-manager plugin run: | asdf plugin add asdf-plugin-manager . asdf install asdf-plugin-manager latest + asdf plugin list --urls --refs asdf global asdf-plugin-manager latest - - name: Test asdf-plugin-manager + asdf plugin remove asdf-plugin-manager + - name: Test asdf-plugin-manager cli run: | + cp -a cli/asdf-plugin-manager.sh /usr/local/bin/asdf-plugin-manager cd test asdf-plugin-manager list asdf-plugin-manager add-all diff --git a/cli/asdf-plugin-manager.sh b/cli/asdf-plugin-manager.sh index 26c5b19..ea9837a 100755 --- a/cli/asdf-plugin-manager.sh +++ b/cli/asdf-plugin-manager.sh @@ -82,7 +82,7 @@ add_plugins() { echo "${managed_plugins}" | while read managed_plugin; do read -r plugin_name plugin_url plugin_ref < <(echo ${managed_plugin}) echo "[INFO] Adding: ${plugin_name} ${plugin_url} ${plugin_ref}" - if [[ "${ADD_CLEAN,,}" == 'true' ]]; then + if [[ "$(echo ${ADD_CLEAN} | tr '[:upper:]' '[:lower:]')" == 'true' ]]; then remove_plugins "$(list_plugins ${plugin_name})" fi asdf plugin add "${plugin_name}" "${plugin_url}"