mirror of
https://github.com/docker/build-push-action.git
synced 2025-06-19 17:27:12 +02:00
Exclude empty items from input list
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -128,7 +128,11 @@ export async function getInputList(name: string, ignoreComma?: boolean): Promise
|
||||
}
|
||||
return items
|
||||
.split(/\r?\n/)
|
||||
.reduce<string[]>((acc, line) => acc.concat(!ignoreComma ? line.split(',') : line).map(pat => pat.trim()), []);
|
||||
.filter(x => x)
|
||||
.reduce<string[]>(
|
||||
(acc, line) => acc.concat(!ignoreComma ? line.split(',').filter(x => x) : line).map(pat => pat.trim()),
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
export const asyncForEach = async (array, callback) => {
|
||||
|
Reference in New Issue
Block a user