Skip to content

Commit fdd48f8

Browse files
authored
chore: remove confusing logging from registry (#2397)
1 parent 4ac30f3 commit fdd48f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/install/installer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ async function validateCache(packagePath: string, browsersPath: string, linksDir
4848
const allBrowsers: browserPaths.BrowserDescriptor[] = [];
4949
for (const fileName of await fsReaddirAsync(linksDir)) {
5050
const linkPath = path.join(linksDir, fileName);
51+
let linkTarget = '';
5152
try {
52-
const linkTarget = (await fsReadFileAsync(linkPath)).toString();
53+
linkTarget = (await fsReadFileAsync(linkPath)).toString();
5354
const browsers = JSON.parse((await fsReadFileAsync(path.join(linkTarget, 'browsers.json'))).toString())['browsers'];
5455
allBrowsers.push(...browsers);
5556
} catch (e) {
56-
logPolitely('Failed to process descriptor at ' + fileName);
57+
if (linkTarget)
58+
logPolitely('Failed to process descriptor at ' + linkTarget);
5759
await fsUnlinkAsync(linkPath).catch(e => {});
5860
}
5961
}

0 commit comments

Comments
 (0)