mirror of
https://github.com/actions/cache.git
synced 2025-04-21 19:46:46 +00:00
formatting and error
This commit is contained in:
parent
c75dca6de7
commit
7c59aeb02d
4 changed files with 8 additions and 42 deletions
|
@ -34,13 +34,13 @@ async function run(): Promise<void> {
|
|||
primaryKey,
|
||||
restoreKeys
|
||||
);
|
||||
|
||||
|
||||
if (!cacheKey) {
|
||||
core.info(
|
||||
`Cache not found for input keys: ${[
|
||||
primaryKey,
|
||||
...restoreKeys
|
||||
].join(", ")}`
|
||||
].join(", ")}`
|
||||
);
|
||||
|
||||
return;
|
||||
|
|
10
src/save.ts
10
src/save.ts
|
@ -44,13 +44,13 @@ async function run(): Promise<void> {
|
|||
required: true
|
||||
});
|
||||
|
||||
const cacheId = await cache.saveCache(cachePaths, primaryKey, {
|
||||
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
|
||||
});
|
||||
if (cacheId == -1 ) {
|
||||
const cacheId = await cache.saveCache(cachePaths, primaryKey, {
|
||||
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
|
||||
});
|
||||
if (cacheId == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
core.info(`Cache saved with key: ${primaryKey}`);
|
||||
} catch (error: unknown) {
|
||||
utils.logWarning((error as Error).message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue