mirror of
https://github.com/codecov/codecov-action.git
synced 2026-04-13 09:30:05 +00:00
changes based on review
This commit is contained in:
parent
5dc449765e
commit
b396576f86
6 changed files with 14 additions and 13 deletions
|
|
@ -70,5 +70,5 @@ test('isValidPlatform', () => {
|
|||
|
||||
test('getCommand', () => {
|
||||
expect(getCommand('path', ['-v', '-x'], 'do-upload'))
|
||||
.toEqual('path -v -x do-upload');
|
||||
.toEqual(['path', '-v', '-x', 'do-upload']);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ const getCommand = (
|
|||
filename: string,
|
||||
generalArgs:string[],
|
||||
command: string,
|
||||
): string => {
|
||||
return filename + ' ' + generalArgs.join(' ') + ' ' + command;
|
||||
): string[] => {
|
||||
return [filename, ...generalArgs, command];
|
||||
};
|
||||
|
||||
export {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ try {
|
|||
});
|
||||
};
|
||||
const doUpload = async () => {
|
||||
await exec.exec(getCommand(filename, args, uploadCommand),
|
||||
await exec.exec(getCommand(filename, args, uploadCommand).join(' '),
|
||||
uploadExecArgs,
|
||||
uploadOptions)
|
||||
.catch((err) => {
|
||||
|
|
@ -80,7 +80,7 @@ try {
|
|||
};
|
||||
const createReport = async () => {
|
||||
await exec.exec(
|
||||
getCommand(filename, args, reportCommand),
|
||||
getCommand(filename, args, reportCommand).join(' '),
|
||||
reportExecArgs,
|
||||
reportOptions)
|
||||
.then(async (exitCode) => {
|
||||
|
|
@ -100,7 +100,8 @@ try {
|
|||
filename,
|
||||
args,
|
||||
commitCommand,
|
||||
), commitExecArgs, commitOptions)
|
||||
).join(' '),
|
||||
commitExecArgs, commitOptions)
|
||||
.then(async (exitCode) => {
|
||||
if (exitCode == 0) {
|
||||
await createReport();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue