Skip to content

Commit

Permalink
fix: 适配新版puppter
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Nov 11, 2017
1 parent b87788a commit beb91b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const installScript =
`
// expose the module to outside
module.exports.downloadURLs = downloadURLs;
module.exports.DEFAULT_DOWNLOAD_HOST = DEFAULT_DOWNLOAD_HOST;
`;
const context = new Context(downLoaderPath);
const script = new vm.Script(`${installScript}`);
Expand Down Expand Up @@ -106,15 +107,15 @@ const Chromium = {
*/
get downloadUrl() {
const url = ChromiumDownloader.downloadURLs[this.platform];
return util.format(url, this.revision);
return util.format(url, ChromiumDownloader.DEFAULT_DOWNLOAD_HOST, this.revision);
},
/**
* download Chromium
* @returns {Promise.<void>}
*/
async download() {
progressBar = null;
await this.Downloader.downloadRevision(this.platform, this.revision, onProgress);
await this.Downloader.downloadRevision(this.platform, this.revision, void 0, onProgress);
},
/**
* Get local chromium path
Expand Down

0 comments on commit beb91b9

Please sign in to comment.