mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-08 03:57:26 +00:00
fix: revert to promise
This commit is contained in:
parent
7636613e41
commit
a8a046d6ab
3 changed files with 9 additions and 5 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
|
@ -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
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue