@@ -47,14 +47,17 @@ function getDirectory(category: string): string {
47
47
}
48
48
49
49
function getPreferredCacheDirectories ( ) : Array < string > {
50
- const preferredCacheDirectories = [ getDirectory ( 'cache' ) ] ;
50
+ const preferredCacheDirectories = [ ] ;
51
51
52
- if ( process . platform !== 'win32 ') {
53
- preferredCacheDirectories . unshift ( '/tmp/.yarn-cache' ) ;
52
+ if ( process . platform === 'darwin ') {
53
+ preferredCacheDirectories . push ( path . join ( userHome , 'Library' , 'Caches' , 'Yarn' ) ) ;
54
54
}
55
55
56
- if ( process . platform === 'darwin' ) {
57
- preferredCacheDirectories . unshift ( path . join ( userHome , 'Library' , 'Caches' , 'Yarn' ) ) ;
56
+ preferredCacheDirectories . push ( getDirectory ( 'cache' ) ) ;
57
+
58
+ if ( process . platform !== 'win32' ) {
59
+ preferredCacheDirectories . unshift ( path . join ( os . tmpdir ( ) , '.yarn-cache' ) ) ;
60
+ preferredCacheDirectories . unshift ( '/tmp/.yarn-cache' ) ;
58
61
}
59
62
60
63
return preferredCacheDirectories ;
@@ -74,7 +77,7 @@ export const LOCKFILE_FILENAME = 'yarn.lock';
74
77
export const METADATA_FILENAME = '.yarn-metadata.json' ;
75
78
export const TARBALL_FILENAME = '.yarn-tarball.tgz' ;
76
79
export const CLEAN_FILENAME = '.yarnclean' ;
77
- export const WTEST_FILENAME = 'yarn-wtest ' ;
80
+ export const ACCESS_FILENAME = '. yarn-access ' ;
78
81
79
82
export const DEFAULT_INDENT = ' ' ;
80
83
export const SINGLE_INSTANCE_PORT = 31997 ;
0 commit comments