formatting and error

This commit is contained in:
Shubham Tiwari 2022-06-24 05:04:57 +00:00 committed by GitHub
parent c75dca6de7
commit 7c59aeb02d
4 changed files with 8 additions and 42 deletions

View file

@ -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;

View file

@ -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);