Skip to content

Commit 845c445

Browse files
authored
not adding -n if empty to do-upload command (#1085)
1 parent 0016507 commit 845c445

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

dist/index.js

Lines changed: 9 additions & 3 deletions
Large diffs are not rendered by default.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/buildExec.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ test('general args', () => {
3535

3636

3737
test('upload args using context', () => {
38-
const expectedArgs = [
39-
'-n',
40-
'',
41-
];
38+
const expectedArgs = [];
4239
const {uploadExecArgs, uploadCommand} = buildUploadExec();
4340
if (context.eventName == 'pull_request') {
4441
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);

src/buildExec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ const buildUploadExec = () => {
149149
const exclude = core.getInput('exclude');
150150

151151
const uploadExecArgs = [];
152-
uploadExecArgs.push(
153-
'-n',
154-
`${name}`,
155-
);
156152
const uploadCommand = 'do-upload';
157153
const uploadOptions:any = {};
158154
uploadOptions.env = Object.assign(process.env, {
@@ -172,7 +168,12 @@ const buildUploadExec = () => {
172168
envVarsArg.push(envVarClean);
173169
}
174170
}
175-
171+
if (name) {
172+
uploadExecArgs.push(
173+
'-n',
174+
`${name}`,
175+
);
176+
}
176177
if (token) {
177178
uploadOptions.env.CODECOV_TOKEN = token;
178179
}

0 commit comments

Comments
 (0)