mirror of
https://github.com/actions/cache.git
synced 2025-07-19 21:47:54 +00:00
v0.11.0
This commit is contained in:
parent
0b4a0a4930
commit
7b3fb19462
5 changed files with 28 additions and 22 deletions
|
@ -9,10 +9,14 @@ export function isGhes(): boolean {
|
|||
return ghUrl.hostname.toUpperCase() !== "GITHUB.COM";
|
||||
}
|
||||
|
||||
export function formatKey(key: string): string {
|
||||
return key.replace(/[^\w\s]/gi, "-");
|
||||
}
|
||||
|
||||
export function isExactKeyMatch(key: string, cacheKey?: string): boolean {
|
||||
return !!(
|
||||
cacheKey &&
|
||||
cacheKey.localeCompare(key, undefined, {
|
||||
formatKey(cacheKey).localeCompare(formatKey(key), undefined, {
|
||||
sensitivity: "accent"
|
||||
}) === 0
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue