fix: trailing comma in files and flags

This commit is contained in:
Joseph Sawaya
2025-03-06 16:54:41 -05:00
parent 5c441a7bcc
commit b85a477268
4 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
uses: ./
with:
fail_ci_if_error: true
files: ./demo/calculator/junit.xml
files: ./demo/calculator/junit.xml,
flags: ${{ matrix.os }}
verbose: true
token: ${{ secrets.CODECOV_ORG_TOKEN }}
+6 -2
View File
@@ -32244,12 +32244,16 @@ const buildUploadArgs = (token, envVars, failCi) => {
}
if (files) {
files.split(',').map((f) => f.trim()).forEach((f) => {
uploadExecArgs.push('-f', `${f}`);
if (f) {
uploadExecArgs.push('-f', `${f}`);
}
});
}
if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => {
uploadExecArgs.push('-F', `${f}`);
if (f) {
uploadExecArgs.push('-F', `${f}`);
}
});
}
if (handleNoReportsFound) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -3
View File
@@ -117,12 +117,16 @@ const buildUploadArgs = (token: string, envVars, failCi: boolean) => {
}
if (files) {
files.split(',').map((f) => f.trim()).forEach((f) => {
uploadExecArgs.push('-f', `${f}`);
if (f) {
uploadExecArgs.push('-f', `${f}`);
}
});
}
if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => {
uploadExecArgs.push('-F', `${f}`);
if (f) {
uploadExecArgs.push('-F', `${f}`);
}
});
}
if (handleNoReportsFound) {
@@ -210,7 +214,7 @@ const buildExecutionOptions = (failCi: boolean, verbose: boolean) => {
const generalArgs = buildGeneralArgs(verbose);
const {uploadExecArgs, uploadCommand} =
buildUploadArgs(token, cleanedEnvVars, failCi);
buildUploadArgs(token, cleanedEnvVars, failCi);
const executionEnvironment = buildExecutionEnvironment(token, cleanedEnvVars);
return {generalArgs, uploadCommand, uploadExecArgs, executionEnvironment};