Accept trailing comma in tool input option

This commit is contained in:
Taiki Endo
2026-04-04 22:08:16 +09:00
parent 26f8c1ab49
commit f43d7b21e2
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ jobs:
if [[ "${list}" == *","* ]]; then
# If a comma is contained, consider it is a comma-separated list.
# Drop leading and trailing whitespaces in each element.
sed -E 's/ *, */,/g; s/^.//' <<<",${list},"
sed -E 's/ *, */,/g; s/^.//; s/,,$/,/' <<<",${list},"
else
# Otherwise, consider it is a whitespace-separated list.
# Convert whitespace characters into comma.