File tree Expand file tree Collapse file tree 3 files changed +16
-29
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +16
-29
lines changed
Original file line number Diff line number Diff line change @@ -59392,7 +59392,7 @@ const core = __importStar(__nccwpck_require__(2186));
59392
59392
const constants_1 = __nccwpck_require__(9042);
59393
59393
const stateProvider_1 = __nccwpck_require__(1527);
59394
59394
const utils = __importStar(__nccwpck_require__(6850));
59395
- function restoreImpl(stateProvider) {
59395
+ function restoreImpl(stateProvider, earlyExit ) {
59396
59396
return __awaiter(this, void 0, void 0, function* () {
59397
59397
try {
59398
59398
if (!utils.isCacheFeatureAvailable()) {
@@ -59438,21 +59438,16 @@ function restoreImpl(stateProvider) {
59438
59438
}
59439
59439
catch (error) {
59440
59440
core.setFailed(error.message);
59441
+ if (earlyExit) {
59442
+ process.exit(1);
59443
+ }
59441
59444
}
59442
59445
});
59443
59446
}
59444
59447
exports.restoreImpl = restoreImpl;
59445
59448
function run(stateProvider, earlyExit) {
59446
59449
return __awaiter(this, void 0, void 0, function* () {
59447
- try {
59448
- yield restoreImpl(stateProvider);
59449
- }
59450
- catch (err) {
59451
- console.error(err);
59452
- if (earlyExit) {
59453
- process.exit(1);
59454
- }
59455
- }
59450
+ yield restoreImpl(stateProvider, earlyExit);
59456
59451
// node will stay alive if any promises are not resolved,
59457
59452
// which is a possibility if HTTP requests are dangling
59458
59453
// due to retries or timeouts. We know that if we got here
Original file line number Diff line number Diff line change @@ -59392,7 +59392,7 @@ const core = __importStar(__nccwpck_require__(2186));
59392
59392
const constants_1 = __nccwpck_require__(9042);
59393
59393
const stateProvider_1 = __nccwpck_require__(1527);
59394
59394
const utils = __importStar(__nccwpck_require__(6850));
59395
- function restoreImpl(stateProvider) {
59395
+ function restoreImpl(stateProvider, earlyExit ) {
59396
59396
return __awaiter(this, void 0, void 0, function* () {
59397
59397
try {
59398
59398
if (!utils.isCacheFeatureAvailable()) {
@@ -59438,21 +59438,16 @@ function restoreImpl(stateProvider) {
59438
59438
}
59439
59439
catch (error) {
59440
59440
core.setFailed(error.message);
59441
+ if (earlyExit) {
59442
+ process.exit(1);
59443
+ }
59441
59444
}
59442
59445
});
59443
59446
}
59444
59447
exports.restoreImpl = restoreImpl;
59445
59448
function run(stateProvider, earlyExit) {
59446
59449
return __awaiter(this, void 0, void 0, function* () {
59447
- try {
59448
- yield restoreImpl(stateProvider);
59449
- }
59450
- catch (err) {
59451
- console.error(err);
59452
- if (earlyExit) {
59453
- process.exit(1);
59454
- }
59455
- }
59450
+ yield restoreImpl(stateProvider, earlyExit);
59456
59451
// node will stay alive if any promises are not resolved,
59457
59452
// which is a possibility if HTTP requests are dangling
59458
59453
// due to retries or timeouts. We know that if we got here
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import {
10
10
import * as utils from "./utils/actionUtils" ;
11
11
12
12
export async function restoreImpl (
13
- stateProvider : IStateProvider
13
+ stateProvider : IStateProvider ,
14
+ earlyExit ?: boolean | undefined
14
15
) : Promise < string | undefined > {
15
16
try {
16
17
if ( ! utils . isCacheFeatureAvailable ( ) ) {
@@ -83,21 +84,17 @@ export async function restoreImpl(
83
84
return cacheKey ;
84
85
} catch ( error : unknown ) {
85
86
core . setFailed ( ( error as Error ) . message ) ;
87
+ if ( earlyExit ) {
88
+ process . exit ( 1 ) ;
89
+ }
86
90
}
87
91
}
88
92
89
93
async function run (
90
94
stateProvider : IStateProvider ,
91
95
earlyExit : boolean | undefined
92
96
) : Promise < void > {
93
- try {
94
- await restoreImpl ( stateProvider ) ;
95
- } catch ( err ) {
96
- console . error ( err ) ;
97
- if ( earlyExit ) {
98
- process . exit ( 1 ) ;
99
- }
100
- }
97
+ await restoreImpl ( stateProvider , earlyExit ) ;
101
98
102
99
// node will stay alive if any promises are not resolved,
103
100
// which is a possibility if HTTP requests are dangling
You can’t perform that action at this time.
0 commit comments