(earlyExit?: boolean)
| 8 | // - https://github.com/actions/setup-node/issues/878 |
| 9 | // https://github.com/actions/cache/pull/1217 |
| 10 | export async function run(earlyExit?: boolean) { |
| 11 | try { |
| 12 | const cache = core.getInput('cache'); |
| 13 | if (cache) { |
| 14 | await saveCache(cache); |
| 15 | |
| 16 | if (earlyExit) { |
| 17 | process.exit(0); |
| 18 | } |
| 19 | } |
| 20 | } catch (error) { |
| 21 | const err = error as Error; |
| 22 | core.setFailed(err.message); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | async function saveCache(packageManager: string) { |
| 27 | const cachePathState = core.getState(State.CACHE_PATHS); |
no test coverage detected