Trim input list items

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-12-05 03:40:39 +01:00
parent 22b2fa68fc
commit 13137a8f9b
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
3 changed files with 17 additions and 2 deletions

@ -166,6 +166,21 @@ describe('getArgs', () => {
'https://github.com/docker/build-push-action.git#test-jest'
]
],
[
'0.4.2',
new Map<string, string>([
['tags', 'name/app:7.4, name/app:latest'],
]),
[
'buildx',
'build',
'--tag', 'name/app:7.4',
'--tag', 'name/app:latest',
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
'--file', 'Dockerfile',
'https://github.com/docker/build-push-action.git#test-jest'
]
],
[
'0.4.2',
new Map<string, string>([

2
dist/index.js generated vendored

@ -12266,7 +12266,7 @@ function getInputList(name, ignoreComma) {
}
res.push(output.join(','));
}
return res.filter(item => item);
return res.filter(item => item).map(pat => pat.trim());
});
}
exports.getInputList = getInputList;

@ -183,7 +183,7 @@ export async function getInputList(name: string, ignoreComma?: boolean): Promise
res.push(output.join(','));
}
return res.filter(item => item);
return res.filter(item => item).map(pat => pat.trim());
}
export const asyncForEach = async (array, callback) => {