@@ -10,16 +10,16 @@ import {logWarning} from '../utils';
10
10
class PoetryCache extends CacheDistributor {
11
11
constructor (
12
12
private pythonVersion : string ,
13
- protected patterns : string = '**/poetry.lock' ,
13
+ protected cacheDependencyPath : string = '**/poetry.lock' ,
14
14
protected poetryProjects : Set < string > = new Set < string > ( )
15
15
) {
16
- super ( 'poetry' , patterns ) ;
16
+ super ( 'poetry' , cacheDependencyPath ) ;
17
17
}
18
18
19
19
protected async getCacheGlobalDirectories ( ) {
20
20
// Same virtualenvs path may appear for different projects, hence we use a Set
21
21
const paths = new Set < string > ( ) ;
22
- const globber = await glob . create ( this . patterns ) ;
22
+ const globber = await glob . create ( this . cacheDependencyPath ) ;
23
23
24
24
for await ( const file of globber . globGenerator ( ) ) {
25
25
const basedir = path . dirname ( file ) ;
@@ -45,7 +45,7 @@ class PoetryCache extends CacheDistributor {
45
45
}
46
46
47
47
protected async computeKeys ( ) {
48
- const hash = await glob . hashFiles ( this . patterns ) ;
48
+ const hash = await glob . hashFiles ( this . cacheDependencyPath ) ;
49
49
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
50
50
const primaryKey = `${ this . CACHE_KEY_PREFIX } -${ process . env [ 'RUNNER_OS' ] } -${ process . arch } -python-${ this . pythonVersion } -${ this . packageManager } -v2-${ hash } ` ;
51
51
const restoreKey = undefined ;
0 commit comments