mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 07:00:27 +00:00
Accept trailing comma in tool input option
This commit is contained in:
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -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.
|
||||
|
||||
2
main.sh
2
main.sh
@@ -35,7 +35,7 @@ normalize_comma_or_space_separated() {
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user