MCPcopy Index your code
hub / github.com/actions/setup-node / run

Function run

src/cache-save.ts:17–33  ·  view source on GitHub ↗
(earlyExit?: boolean)

Source from the content-addressed store, hash-verified

15
16// Added early exit to resolve issue with slow post action step:
17export async function run(earlyExit?: boolean) {
18 try {
19 const cacheLock = core.getState(State.CachePackageManager);
20
21 if (cacheLock) {
22 await cachePackages(cacheLock);
23
24 if (earlyExit) {
25 process.exit(0);
26 }
27 } else {
28 core.debug(`Caching for '${cacheLock}' is not supported`);
29 }
30 } catch (error) {
31 core.setFailed((error as Error).message);
32 }
33}
34
35const cachePackages = async (packageManager: string) => {
36 const state = core.getState(State.CacheMatchedKey);

Callers 2

cache-save.test.tsFile · 0.90
cache-save.tsFile · 0.70

Calls 1

cachePackagesFunction · 0.85

Tested by

no test coverage detected