1
0
Fork 0
mirror of https://github.com/docker/build-push-action.git synced 2025-04-22 14:46:39 +02:00

Exclude empty items from input list

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-09-05 02:52:09 +02:00
parent e01a38bb45
commit 90d197d06b
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
3 changed files with 21 additions and 2 deletions

3
dist/index.js generated vendored
View file

@ -13746,7 +13746,8 @@ function getInputList(name, ignoreComma) {
}
return items
.split(/\r?\n/)
.reduce((acc, line) => acc.concat(!ignoreComma ? line.split(',') : line).map(pat => pat.trim()), []);
.filter(x => x)
.reduce((acc, line) => acc.concat(!ignoreComma ? line.split(',').filter(x => x) : line).map(pat => pat.trim()), []);
});
}
exports.getInputList = getInputList;