Skip to content

Commit

Permalink
Fix downloadURL usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zabil committed May 14, 2024
1 parent 509799b commit 50d2ca6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/browser/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BrowserFetcher {
*/
constructor(metadata = new BrowserMetadata()) {
this._downloadsFolder = path.join(helper.projectRoot(), '.local-chromium');
this.downloadURL = metadata.downloadURL();
this.downloadURL = metadata.downloadURL;
this.revisionInfo = metadata.revisionInfo();
this._platform = metadata.platform();
}
Expand Down
15 changes: 3 additions & 12 deletions lib/browser/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,10 @@ class BrowserMetadata {
const download = browser.downloads.chrome.find(
(download) => download.platform === this._platform,
);
this.downloadEndpoint = download.url;
this.downloadURL = download.url;
this.revision = browser.revision;
}

downloadURL() {
return this.downloadEndpoint;
}

revision() {
return this.revision;
}

platform() {
return this._platform;
}
Expand Down Expand Up @@ -99,8 +91,7 @@ class BrowserMetadata {
}

/**
* @param {string} revision
* @return {!BrowserFetcher.RevisionInfo}
* @return {!BrowserMetadata.RevisionInfo}
*/
revisionInfo() {
const folderPath = this._getFolderPath(this.revision);
Expand All @@ -127,7 +118,7 @@ class BrowserMetadata {
executablePath,
folderPath,
local,
url: this.downloadEndpoint,
url: this.downloadURL,
};
}

Expand Down

0 comments on commit 50d2ca6

Please sign in to comment.