mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-01-31 11:17:10 +08:00
Fix ignoreError()
.
This commit is contained in:
parent
a39d51e58e
commit
c641a461ac
13
dist/cleanup/index.js
generated
vendored
13
dist/cleanup/index.js
generated
vendored
@ -67015,12 +67015,15 @@ function saveCache() {
|
|||||||
*/
|
*/
|
||||||
function ignoreError(promise) {
|
function ignoreError(promise) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
/* eslint-disable github/no-then */
|
||||||
yield promise;
|
return new Promise(resolve => {
|
||||||
}
|
promise
|
||||||
catch (error) {
|
.catch(error => {
|
||||||
core.warning(error);
|
core.warning(error);
|
||||||
}
|
resolve(void 0);
|
||||||
|
})
|
||||||
|
.then(resolve);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
|
@ -45,12 +45,16 @@ async function saveCache(): Promise<void> {
|
|||||||
* @param promise the promise to ignore error from
|
* @param promise the promise to ignore error from
|
||||||
* @returns Promise that will ignore error reported by the given promise
|
* @returns Promise that will ignore error reported by the given promise
|
||||||
*/
|
*/
|
||||||
async function ignoreError(promise: Promise<void>): Promise<void> {
|
async function ignoreError(promise: Promise<void>): Promise<unknown> {
|
||||||
try {
|
/* eslint-disable github/no-then */
|
||||||
await promise
|
return new Promise(resolve => {
|
||||||
} catch (error) {
|
promise
|
||||||
|
.catch(error => {
|
||||||
core.warning(error)
|
core.warning(error)
|
||||||
}
|
resolve(void 0)
|
||||||
|
})
|
||||||
|
.then(resolve)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function run(): Promise<void> {
|
export async function run(): Promise<void> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user