@@ -68,13 +68,13 @@ let projectCacheHit = false
6868let globalCacheHit = false
6969
7070async function _tryRestoreCache (
71- type : 'Project ' | 'Global ' ,
71+ type : 'project ' | 'global ' ,
7272 keyPrefix : string ,
7373 generateKey : ( prefix : string ) => Promise < string > ,
7474 cachePath : string ,
7575 onHit : ( ) => void
7676) : Promise < string | undefined > {
77- return core . group ( `Restoring ${ type . toLowerCase ( ) } cache` , async ( ) => {
77+ return core . group ( `Restoring ${ type } cache` , async ( ) => {
7878 const cacheKey = await generateKey ( keyPrefix )
7979 core . debug ( `Cache key: ${ cacheKey } ` )
8080 core . debug ( `Cache path: ${ cachePath } ` )
@@ -90,14 +90,14 @@ async function _tryRestoreCache(
9090}
9191
9292async function _saveCache (
93- type : 'Project ' | 'Global ' ,
93+ type : 'project ' | 'global ' ,
9494 wasHit : boolean ,
9595 keyPrefix : string ,
9696 generateKey : ( prefix : string ) => Promise < string > ,
9797 cachePath : string
9898) {
9999 if ( wasHit ) {
100- core . debug ( `Skipping ${ type . toLowerCase ( ) } cache save because cache was restored.` )
100+ core . debug ( `Skipping ${ type } cache save because cache was restored.` )
101101 return
102102 }
103103
@@ -108,7 +108,7 @@ async function _saveCache(
108108 core . info ( `Saved cache with ID "${ cacheId . toString ( ) } "` )
109109 } catch ( err : unknown ) {
110110 // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
111- core . error ( `Error saving ${ type . toLowerCase ( ) } cache: ${ err } ` )
111+ core . error ( `Error saving ${ type } cache: ${ err } ` )
112112 }
113113 } )
114114}
@@ -119,7 +119,7 @@ export const tryRestoreProjectCache = async (): Promise<string | undefined> => {
119119 core . debug ( 'Skipping project cache restore.' )
120120 return undefined
121121 }
122- return _tryRestoreCache ( 'Project ' , cache_ . cacheKeyPrefix , generateProjectCacheKey , projectCachePath , ( ) => {
122+ return _tryRestoreCache ( 'project ' , cache_ . cacheKeyPrefix , generateProjectCacheKey , projectCachePath , ( ) => {
123123 projectCacheHit = true
124124 } )
125125}
@@ -130,7 +130,7 @@ export const tryRestoreGlobalCache = async (): Promise<string | undefined> => {
130130 core . debug ( 'Skipping global cache restore.' )
131131 return undefined
132132 }
133- return _tryRestoreCache ( 'Global ' , cache_ . cacheKeyPrefix , generateGlobalCacheKey , getGlobalCachePath ( ) , ( ) => {
133+ return _tryRestoreCache ( 'global ' , cache_ . cacheKeyPrefix , generateGlobalCacheKey , getGlobalCachePath ( ) , ( ) => {
134134 globalCacheHit = true
135135 } )
136136}
@@ -141,7 +141,7 @@ export const saveProjectCache = async () => {
141141 core . debug ( 'Skipping project cache save.' )
142142 return
143143 }
144- await _saveCache ( 'Project ' , projectCacheHit , cache_ . cacheKeyPrefix , generateProjectCacheKey , projectCachePath )
144+ await _saveCache ( 'project ' , projectCacheHit , cache_ . cacheKeyPrefix , generateProjectCacheKey , projectCachePath )
145145}
146146
147147export const saveGlobalCache = async ( ) => {
@@ -150,5 +150,5 @@ export const saveGlobalCache = async () => {
150150 core . debug ( 'Skipping global cache save.' )
151151 return
152152 }
153- await _saveCache ( 'Global ' , globalCacheHit , cache_ . cacheKeyPrefix , generateGlobalCacheKey , getGlobalCachePath ( ) )
153+ await _saveCache ( 'global ' , globalCacheHit , cache_ . cacheKeyPrefix , generateGlobalCacheKey , getGlobalCachePath ( ) )
154154}
0 commit comments