Skip to content

Commit efcc5ef

Browse files
committed
remove catch in symlinkNodeModulesFromCache
1 parent b439e3e commit efcc5ef

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

system-tests/lib/dep-installer/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ async function ensureCacheDir (cacheDir: string) {
5353
* Symlink the cached `node_modules` directory to the temp project directory's `node_modules`.
5454
*/
5555
async function symlinkNodeModulesFromCache (tmpNodeModulesDir: string, cacheDir: string): Promise<void> {
56-
try {
57-
await fs.symlink(cacheDir, tmpNodeModulesDir, 'junction')
58-
} catch (err) {
59-
// TODO: this looks wrong, shouldn't it re-throw sometimes?
60-
if (err.code !== 'EEXIST') return
61-
}
56+
await fs.symlink(cacheDir, tmpNodeModulesDir, 'junction')
6257

6358
log(`node_modules symlink created at ${tmpNodeModulesDir}`)
6459
}

0 commit comments

Comments
 (0)