mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-03-31 20:17:48 +02:00
style
This commit is contained in:
parent
d77303b678
commit
e3eed523a5
1 changed files with 15 additions and 4 deletions
|
@ -2,7 +2,11 @@ import * as cache from "@actions/cache";
|
|||
import * as core from "@actions/core";
|
||||
|
||||
import { Events, Inputs, Outputs, State } from "./constants";
|
||||
import { IStateProvider, NullStateProvider, StateProvider } from "./stateProvider";
|
||||
import {
|
||||
IStateProvider,
|
||||
NullStateProvider,
|
||||
StateProvider
|
||||
} from "./stateProvider";
|
||||
import * as utils from "./utils/actionUtils";
|
||||
|
||||
export async function restoreImpl(
|
||||
|
@ -82,7 +86,10 @@ export async function restoreImpl(
|
|||
}
|
||||
}
|
||||
|
||||
async function run(stateProvider: IStateProvider, earlyExit: boolean | undefined): Promise<void> {
|
||||
async function run(
|
||||
stateProvider: IStateProvider,
|
||||
earlyExit: boolean | undefined
|
||||
): Promise<void> {
|
||||
try {
|
||||
await restoreImpl(stateProvider);
|
||||
} catch (err) {
|
||||
|
@ -102,10 +109,14 @@ async function run(stateProvider: IStateProvider, earlyExit: boolean | undefined
|
|||
}
|
||||
}
|
||||
|
||||
export async function restoreOnlyRun(earlyExit?: boolean | undefined): Promise<void> {
|
||||
export async function restoreOnlyRun(
|
||||
earlyExit?: boolean | undefined
|
||||
): Promise<void> {
|
||||
await run(new NullStateProvider(), earlyExit);
|
||||
}
|
||||
|
||||
export async function restoreRun(earlyExit?: boolean | undefined): Promise<void> {
|
||||
export async function restoreRun(
|
||||
earlyExit?: boolean | undefined
|
||||
): Promise<void> {
|
||||
await run(new StateProvider(), earlyExit);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue