Loading src/restore.ts +11 −5 Changes for src/restore.ts: 11 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -4,6 +4,11 @@ import * as core from "@actions/core"; import { Events, Inputs, State } from "./constants"; import * as utils from "./utils/actionUtils"; interface RestoreError { name: string; message: string; } async function run(): Promise<void> { try { if (!utils.isCacheFeatureAvailable()) { Loading Loading @@ -52,16 +57,17 @@ async function run(): Promise<void> { utils.setCacheHitOutput(isExactKeyMatch); core.info(`Cache restored from key: ${cacheKey}`); } catch (error: any) { if (error.name === cache.ValidationError.name) { } catch (error: unknown) { const typedError = error as Error; if (typedError.name === cache.ValidationError.name) { throw error; } else { utils.logWarning(error.message); utils.logWarning(typedError.message); utils.setCacheHitOutput(false); } } } catch (error: any) { core.setFailed(error.message); } catch (error: unknown) { core.setFailed((error as Error ).message); } } Loading src/save.ts +8 −7 Changes for src/save.ts: 8 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -49,17 +49,18 @@ async function run(): Promise<void> { uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize) }); core.info(`Cache saved with key: ${primaryKey}`); } catch (error: any) { if (error.name === cache.ValidationError.name) { } catch (error: unknown) { const typedError = error as Error; if (typedError.name === cache.ValidationError.name) { throw error; } else if (error.name === cache.ReserveCacheError.name) { core.info(error.message); } else if (typedError.name === cache.ReserveCacheError.name) { core.info(typedError.message); } else { utils.logWarning(error.message); utils.logWarning(typedError.message); } } } catch (error: any) { utils.logWarning(error.message); } catch (error: unknown) { utils.logWarning((error as Error).message); } } Loading Loading
src/restore.ts +11 −5 Changes for src/restore.ts: 11 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -4,6 +4,11 @@ import * as core from "@actions/core"; import { Events, Inputs, State } from "./constants"; import * as utils from "./utils/actionUtils"; interface RestoreError { name: string; message: string; } async function run(): Promise<void> { try { if (!utils.isCacheFeatureAvailable()) { Loading Loading @@ -52,16 +57,17 @@ async function run(): Promise<void> { utils.setCacheHitOutput(isExactKeyMatch); core.info(`Cache restored from key: ${cacheKey}`); } catch (error: any) { if (error.name === cache.ValidationError.name) { } catch (error: unknown) { const typedError = error as Error; if (typedError.name === cache.ValidationError.name) { throw error; } else { utils.logWarning(error.message); utils.logWarning(typedError.message); utils.setCacheHitOutput(false); } } } catch (error: any) { core.setFailed(error.message); } catch (error: unknown) { core.setFailed((error as Error ).message); } } Loading
src/save.ts +8 −7 Changes for src/save.ts: 8 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -49,17 +49,18 @@ async function run(): Promise<void> { uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize) }); core.info(`Cache saved with key: ${primaryKey}`); } catch (error: any) { if (error.name === cache.ValidationError.name) { } catch (error: unknown) { const typedError = error as Error; if (typedError.name === cache.ValidationError.name) { throw error; } else if (error.name === cache.ReserveCacheError.name) { core.info(error.message); } else if (typedError.name === cache.ReserveCacheError.name) { core.info(typedError.message); } else { utils.logWarning(error.message); utils.logWarning(typedError.message); } } } catch (error: any) { utils.logWarning(error.message); } catch (error: unknown) { utils.logWarning((error as Error).message); } } Loading