From 62ff95cc0cc40f60e37b34da897cdcf7506f9f5c Mon Sep 17 00:00:00 2001 From: Zabil Cheriya Maliackal Date: Tue, 14 May 2024 16:21:23 +0100 Subject: [PATCH] Initialize metadata globally --- lib/browser/fetcher.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/browser/fetcher.js b/lib/browser/fetcher.js index 35b900629..802e1bd41 100644 --- a/lib/browser/fetcher.js +++ b/lib/browser/fetcher.js @@ -31,6 +31,7 @@ const mkdirAsync = util.promisify(fs.mkdir.bind(fs)); const unlinkAsync = util.promisify(fs.unlink.bind(fs)); const chmodAsync = util.promisify(fs.chmod.bind(fs)); const BrowserMetadata = require('./metadata'); +const metadata = new BrowserMetadata(); function existsAsync(filePath) { let fulfill = null; @@ -43,7 +44,7 @@ class BrowserFetcher { /** * @param {!BrowserFetcher.Options=} options */ - constructor(metadata = new BrowserMetadata()) { + constructor() { this._downloadsFolder = path.join(helper.projectRoot(), '.local-chromium'); this.downloadURL = metadata.downloadURL; this.revisionInfo = metadata.revisionInfo();