Skip to content

Commit 6a0d254

Browse files
author
Maël Nison
committed
Remove the /tmp fallback
1 parent 095fc45 commit 6a0d254

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/constants.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,11 @@ function getPreferredCacheDirectories(): Array<string> {
5252

5353
if (process.platform === 'darwin') {
5454
preferredCacheDirectories.push(path.join(userHome, 'Library', 'Caches', 'Yarn'));
55+
} else {
56+
preferredCacheDirectories.push(getDirectory('cache'));
5557
}
5658

57-
preferredCacheDirectories.push(getDirectory('cache'));
58-
59-
if (process.platform !== 'win32') {
60-
preferredCacheDirectories.push(path.join(os.tmpdir(), '.yarn-cache'));
61-
preferredCacheDirectories.push('/tmp/.yarn-cache');
62-
}
59+
preferredCacheDirectories.push(path.join(os.tmpdir(), '.yarn-cache'));
6360

6461
return preferredCacheDirectories;
6562
}

0 commit comments

Comments
 (0)