Skip to content

Commit

Permalink
Workaround for actions/toolkit#1377
Browse files Browse the repository at this point in the history
  • Loading branch information
azrsh committed Jul 19, 2023
1 parent 3492d92 commit 89369bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58579,7 +58579,9 @@ function bundleInstall() {
primaryKey: `${baseKey}-${lockfileHash}`,
restoreKeys: [baseKey],
};
const cacheHit = yield cache.restoreCache(cacheOptions.paths, cacheOptions.primaryKey, cacheOptions.restoreKeys);
const cacheHit = yield cache.restoreCache(
// https://github.com/actions/toolkit/issues/1377
cacheOptions.paths.slice(), cacheOptions.primaryKey, cacheOptions.restoreKeys);
yield exec.exec("bundle", ["install"], execOptions);
if (cacheHit !== cacheOptions.primaryKey) {
yield cache.saveCache(cacheOptions.paths, cacheOptions.primaryKey);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/bundler_cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export async function bundleInstall() {
};

const cacheHit = await cache.restoreCache(
cacheOptions.paths,
// https://github.com/actions/toolkit/issues/1377
cacheOptions.paths.slice(),
cacheOptions.primaryKey,
cacheOptions.restoreKeys
);
Expand Down

0 comments on commit 89369bd

Please sign in to comment.