3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-22 11:25:31 +00:00

Sort inputs and remove whitespaces after exclamation at the beginning of lines

This commit is contained in:
Álvaro Mondéjar 2020-11-28 20:34:06 +01:00 committed by Vipul
parent fd5de65bc8
commit 204fa1ab69
3 changed files with 34 additions and 3 deletions

View file

@ -61,8 +61,9 @@ export function getInputAsArray(
return core
.getInput(name, options)
.split("\n")
.map(s => s.trim())
.filter(x => x !== "");
.map(s => s.replace(/^\!\s+/, '!').trim())
.filter(x => x !== "")
.sort();
}
export function getInputAsInt(