changes based on review

This commit is contained in:
Dana 2023-09-07 13:18:25 +03:00
parent 5dc449765e
commit b396576f86
No known key found for this signature in database
GPG key ID: CE3464681E428690
6 changed files with 14 additions and 13 deletions

View file

@ -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']);
});

View file

@ -55,8 +55,8 @@ const getCommand = (
filename: string,
generalArgs:string[],
command: string,
): string => {
return filename + ' ' + generalArgs.join(' ') + ' ' + command;
): string[] => {
return [filename, ...generalArgs, command];
};
export {

View file

@ -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();