mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-11 05:27:24 +00:00
fix: handle trailing commas
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
This commit is contained in:
parent
ccf7a1fd43
commit
69df7f6793
4 changed files with 8 additions and 4 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
|
@ -32568,7 +32568,9 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
|
||||||
}
|
}
|
||||||
if (files) {
|
if (files) {
|
||||||
files.split(',').map((f) => f.trim()).forEach((f) => {
|
files.split(',').map((f) => f.trim()).forEach((f) => {
|
||||||
uploadExecArgs.push('-f', `${f}`);
|
if (f.length > 0) { // this handles trailing commas
|
||||||
|
uploadExecArgs.push('-f', `${f}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (flags) {
|
if (flags) {
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -75,7 +75,7 @@ test('upload args', async () => {
|
||||||
'exclude': 'node_modules/',
|
'exclude': 'node_modules/',
|
||||||
'fail_ci_if_error': 'true',
|
'fail_ci_if_error': 'true',
|
||||||
'file': 'coverage.xml',
|
'file': 'coverage.xml',
|
||||||
'files': 'dir1/coverage.xml,dir2/coverage.xml',
|
'files': 'dir1/coverage.xml,dir2/coverage.xml,',
|
||||||
'flags': 'test,test2',
|
'flags': 'test,test2',
|
||||||
'git_service': 'github_enterprise',
|
'git_service': 'github_enterprise',
|
||||||
'handle_no_reports_found': 'true',
|
'handle_no_reports_found': 'true',
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,9 @@ const buildUploadExec = async (): Promise<{
|
||||||
}
|
}
|
||||||
if (files) {
|
if (files) {
|
||||||
files.split(',').map((f) => f.trim()).forEach((f) => {
|
files.split(',').map((f) => f.trim()).forEach((f) => {
|
||||||
uploadExecArgs.push('-f', `${f}`);
|
if (f.length > 0) { // this handles trailing commas
|
||||||
|
uploadExecArgs.push('-f', `${f}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (flags) {
|
if (flags) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue