File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,6 @@ const getLintCacheDir = (): string => {
23
23
return path . resolve ( `${ process . env . HOME } /.cache/golangci-lint` )
24
24
}
25
25
26
- const getCacheDirs = ( ) : string [ ] => {
27
- return [ getLintCacheDir ( ) ]
28
- }
29
-
30
26
const getIntervalKey = ( invalidationIntervalDays : number ) : string => {
31
27
const now = new Date ( )
32
28
const secondsSinceEpoch = now . getTime ( ) / 1000
@@ -81,7 +77,7 @@ export async function restoreCache(): Promise<void> {
81
77
}
82
78
core . saveState ( State . CachePrimaryKey , primaryKey )
83
79
try {
84
- const cacheKey = await cache . restoreCache ( getCacheDirs ( ) , primaryKey , restoreKeys )
80
+ const cacheKey = await cache . restoreCache ( [ getLintCacheDir ( ) ] , primaryKey , restoreKeys )
85
81
if ( ! cacheKey ) {
86
82
core . info ( `Cache not found for input keys: ${ [ primaryKey , ...restoreKeys ] . join ( ", " ) } ` )
87
83
return
@@ -111,7 +107,7 @@ export async function saveCache(): Promise<void> {
111
107
112
108
const startedAt = Date . now ( )
113
109
114
- const cacheDirs = getCacheDirs ( )
110
+ const cacheDirs = [ getLintCacheDir ( ) ]
115
111
const primaryKey = core . getState ( State . CachePrimaryKey )
116
112
if ( ! primaryKey ) {
117
113
utils . logWarning ( `Error retrieving key from state.` )
You can’t perform that action at this time.
0 commit comments