Skip to content

Commit

Permalink
Use paths slice for restore
Browse files Browse the repository at this point in the history
  • Loading branch information
mfinelli committed Sep 18, 2023
1 parent fba7716 commit 9492558
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ function run() {
const month = date.toLocaleString("default", { month: "long" });
const paths = [binPath + "/magick"];
const cacheKey = "imagemagick-" + os.platform() + "-" + month;
const restoreKeys = ["imagemagick-" + os.platform()];
let cacheRestored = undefined;
if (doCache) {
core.info("Attempting to retrieve from the cache: " + cacheKey);
cacheRestored = yield cache.restoreCache(paths, cacheKey, restoreKeys);
cacheRestored = yield cache.restoreCache(paths.slice(), cacheKey);
core.info("response from cache: " + cacheRestored);
if (cacheRestored !== undefined) {
core.info("Restored imagemagick from the cache");
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ async function run(): Promise<void> {
const month = date.toLocaleString("default", { month: "long" });
const paths = [binPath + "/magick"];
const cacheKey = "imagemagick-" + os.platform() + "-" + month;
const restoreKeys = ["imagemagick-" + os.platform()];
let cacheRestored = undefined;

if (doCache) {
core.info("Attempting to retrieve from the cache: " + cacheKey);
cacheRestored = await cache.restoreCache(paths, cacheKey, restoreKeys);
cacheRestored = await cache.restoreCache(paths.slice(), cacheKey);

core.info("response from cache: " + cacheRestored);

Expand Down

0 comments on commit 9492558

Please sign in to comment.