Trim whitespace from tool names

Closes #115
This commit is contained in:
Taiki Endo
2023-05-04 02:07:18 +09:00
parent a24dd0e0c4
commit 962051977d
3 changed files with 7 additions and 2 deletions

View File

@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased] ## [Unreleased]
- Trim whitespace from tool names. ([#115](https://github.com/taiki-e/install-action/pull/115))
## [2.7.2] - 2023-04-28 ## [2.7.2] - 2023-04-28
- Update `cargo-llvm-cov@latest` to 0.5.19. - Update `cargo-llvm-cov@latest` to 0.5.19.

View File

@@ -323,7 +323,10 @@ manifest_dir="$(dirname "$0")/manifests"
tool="${INPUT_TOOL:-}" tool="${INPUT_TOOL:-}"
tools=() tools=()
if [[ -n "${tool}" ]]; then if [[ -n "${tool}" ]]; then
while read -rd,; do tools+=("${REPLY}"); done <<<"${tool}," while read -rd,; do
t="${REPLY# *}"
tools+=("${t%* }")
done <<<"${tool},"
fi fi
if [[ ${#tools[@]} -eq 0 ]]; then if [[ ${#tools[@]} -eq 0 ]]; then
warn "no tool specified; this could be caused by a dependabot bug where @<tool_name> tags on this action are replaced by @<version> tags" warn "no tool specified; this could be caused by a dependabot bug where @<tool_name> tags on this action are replaced by @<version> tags"