mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
not adding -n if empty to do-upload command (#1085)
This commit is contained in:
12
dist/index.js
vendored
12
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -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}`);
|
||||
|
||||
@@ -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, {
|
||||
@@ -172,7 +168,12 @@ const buildUploadExec = () => {
|
||||
envVarsArg.push(envVarClean);
|
||||
}
|
||||
}
|
||||
|
||||
if (name) {
|
||||
uploadExecArgs.push(
|
||||
'-n',
|
||||
`${name}`,
|
||||
);
|
||||
}
|
||||
if (token) {
|
||||
uploadOptions.env.CODECOV_TOKEN = token;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user