Skip to content

Commit

Permalink
not adding -n if empty to do-upload command (#1085)
Browse files Browse the repository at this point in the history
  • Loading branch information
dana-yaish authored Sep 13, 2023
1 parent 0016507 commit 845c445
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
12 changes: 9 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions src/buildExec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ test('general args', () => {


test('upload args using context', () => {
const expectedArgs = [
'-n',
'',
];
const expectedArgs = [];
const {uploadExecArgs, uploadCommand} = buildUploadExec();
if (context.eventName == 'pull_request') {
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
Expand Down
11 changes: 6 additions & 5 deletions src/buildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ const buildUploadExec = () => {
const exclude = core.getInput('exclude');

const uploadExecArgs = [];
uploadExecArgs.push(
'-n',
`${name}`,
);
const uploadCommand = 'do-upload';
const uploadOptions:any = {};
uploadOptions.env = Object.assign(process.env, {
Expand All @@ -172,7 +168,12 @@ const buildUploadExec = () => {
envVarsArg.push(envVarClean);
}
}

if (name) {
uploadExecArgs.push(
'-n',
`${name}`,
);
}
if (token) {
uploadOptions.env.CODECOV_TOKEN = token;
}
Expand Down

0 comments on commit 845c445

Please sign in to comment.