Skip to content

Commit

Permalink
Rename to isExactCacheKeyMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
BytewaveMLP committed Oct 21, 2024
1 parent 767948d commit b4d6987
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
await exec.exec('bundle', ['install', '--jobs', '4'])

// @actions/cache only allows to save for non-existing keys
if (!common.isExactKeyMatch(key, cachedKey)) {
if (!common.isExactCacheKeyMatch(key, cachedKey)) {
if (cachedKey) { // existing cache but Gemfile.lock differs, clean old gems
await exec.exec('bundle', ['clean'])
}
Expand Down
2 changes: 1 addition & 1 deletion common.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export function setupPath(newPathEntries) {
// Determines if two keys are an exact match for the purposes of cache matching
// Specifically, this is a case-insensitive match that ignores accents
// From actions/cache@v3 src/utils/actionUtils.ts (MIT)
export function isExactKeyMatch(key, cacheKey) {
export function isExactCacheKeyMatch(key, cacheKey) {
return !!(
cacheKey &&
cacheKey.localeCompare(key, undefined, {
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b4d6987

Please sign in to comment.