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

@@ -52,7 +52,7 @@ jobs:
- os: ubuntu-20.04
tool: cargo-hack@0.5,cargo-llvm-cov@0.5,cargo-minimal-versions@0.1,cargo-no-dev-deps@0.1,parse-changelog@0.5,cargo-udeps@0.1,cargo-valgrind@2.1,cargo-deny@0.13,cross@0.2,dprint@0.34,just@1.9,nextest@0.9,protoc@3.21,shellcheck@0.9,shfmt@3.5,wasm-pack@0.10,wasmtime@6.0,mdbook@0.4,mdbook-linkcheck@0.7,cargo-watch@8.1,grcov@0.8,watchexec-cli@1.20,cargo-tarpaulin@0.25,zola@0.16
- os: ubuntu-20.04
tool: cargo-valgrind@2,just@1,protoc@3,shfmt@3,wasmtime@7,cargo-watch@8,watchexec-cli@1
tool: cargo-valgrind@2, just@1, protoc@3, shfmt@3 ,wasmtime@7,cargo-watch@8,watchexec-cli@1
- os: macos-11
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,cargo-no-dev-deps,parse-changelog,cargo-udeps,cargo-valgrind,cargo-deny,cross,dprint,just,nextest,protoc,shellcheck,shfmt,wasm-pack,wasmtime,mdbook,mdbook-linkcheck,cargo-watch,grcov,watchexec-cli,cargo-tarpaulin,zola
- os: windows-2019

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]
- Trim whitespace from tool names. ([#115](https://github.com/taiki-e/install-action/pull/115))
## [2.7.2] - 2023-04-28
- Update `cargo-llvm-cov@latest` to 0.5.19.

View File

@@ -323,7 +323,10 @@ manifest_dir="$(dirname "$0")/manifests"
tool="${INPUT_TOOL:-}"
tools=()
if [[ -n "${tool}" ]]; then
while read -rd,; do tools+=("${REPLY}"); done <<<"${tool},"
while read -rd,; do
t="${REPLY# *}"
tools+=("${t%* }")
done <<<"${tool},"
fi
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"