fix: revert to promise

This commit is contained in:
Tom Hu 2024-05-20 18:53:02 +07:00
parent 7636613e41
commit a8a046d6ab
No known key found for this signature in database
GPG key ID: 79155678363963D2
3 changed files with 9 additions and 5 deletions

6
dist/index.js vendored
View file

@ -32353,7 +32353,7 @@ const isPullRequestFromFork = () => {
const getToken = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
if (isPullRequestFromFork()) {
core.info('==> Fork detected, tokenless uploading used');
return '';
return Promise.resolve('');
}
let token = core.getInput('token');
let url = core.getInput('url');
@ -32538,7 +32538,9 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
envVarsArg.push(envVarClean);
}
}
uploadOptions.env.CODECOV_TOKEN = token;
if (token) {
uploadOptions.env.CODECOV_TOKEN = token;
}
if (disableFileFixes) {
uploadExecArgs.push('--disable-file-fixes');
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -48,7 +48,7 @@ const isPullRequestFromFork = (): boolean => {
const getToken = async (): Promise<string> => {
if (isPullRequestFromFork()) {
core.info('==> Fork detected, tokenless uploading used');
return '';
return Promise.resolve('');
}
let token = core.getInput('token');
let url = core.getInput('url');
@ -281,7 +281,9 @@ const buildUploadExec = async (): Promise<{
envVarsArg.push(envVarClean);
}
}
uploadOptions.env.CODECOV_TOKEN = token;
if (token) {
uploadOptions.env.CODECOV_TOKEN = token;
}
if (disableFileFixes) {
uploadExecArgs.push('--disable-file-fixes');
}