File tree 2 files changed +10
-10
lines changed 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -38798,7 +38798,7 @@ class PoetryCache extends cache_distributor_1.default {
38798
38798
const cacheDir = poetryConfig['cache-dir'];
38799
38799
const virtualenvsPath = poetryConfig['virtualenvs.path'].replace('{cache-dir}', cacheDir);
38800
38800
const paths = [virtualenvsPath];
38801
- if (poetryConfig['virtualenvs.in-project'] === ' true' ) {
38801
+ if (poetryConfig['virtualenvs.in-project'] === true) {
38802
38802
paths.push(path.join(process.cwd(), '.venv'));
38803
38803
}
38804
38804
return paths;
@@ -38830,7 +38830,7 @@ class PoetryCache extends cache_distributor_1.default {
38830
38830
for (let line of lines) {
38831
38831
line = line.replace(/#.*$/, '');
38832
38832
const [key, value] = line.split('=').map(part => part.trim());
38833
- config[key] = value;
38833
+ config[key] = JSON.parse( value) ;
38834
38834
}
38835
38835
return config;
38836
38836
});
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class PoetryCache extends CacheDistributor {
24
24
25
25
const paths = [ virtualenvsPath ] ;
26
26
27
- if ( poetryConfig [ 'virtualenvs.in-project' ] === ' true' ) {
27
+ if ( poetryConfig [ 'virtualenvs.in-project' ] === true ) {
28
28
paths . push ( path . join ( process . cwd ( ) , '.venv' ) ) ;
29
29
}
30
30
@@ -57,21 +57,21 @@ class PoetryCache extends CacheDistributor {
57
57
58
58
const lines = stdout . trim ( ) . split ( os . EOL ) ;
59
59
60
- const config = { } as {
61
- 'cache-dir' : string ;
62
- 'virtualenvs.in-project' : string ;
63
- 'virtualenvs.path' : string ;
64
- } ;
60
+ const config : any = { } ;
65
61
66
62
for ( let line of lines ) {
67
63
line = line . replace ( / # .* $ / , '' ) ;
68
64
69
65
const [ key , value ] = line . split ( '=' ) . map ( part => part . trim ( ) ) ;
70
66
71
- config [ key as keyof typeof config ] = value ;
67
+ config [ key ] = JSON . parse ( value ) ;
72
68
}
73
69
74
- return config ;
70
+ return config as {
71
+ 'cache-dir' : string ;
72
+ 'virtualenvs.in-project' : boolean ;
73
+ 'virtualenvs.path' : string ;
74
+ } ;
75
75
}
76
76
}
77
77
You can’t perform that action at this time.
0 commit comments