Skip to content

Commit

Permalink
fix: remove one layer of HTTP redirects for Electron headers (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
malept authored Mar 9, 2020
1 parent 3a9a90c commit 3ee5d4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ import rebuild from 'electron-rebuild';
// onlyModules (optional) - Default: null - An array of modules to rebuild, ONLY these module names will be rebuilt.
// The "types" property will be ignored if this option is set.
// force (optional) - Default: false - Force a rebuild of modules regardless of their current build state
// headerURL (optional) - Default: https://electronjs.org/headers - The URL to download Electron header files from
// headerURL (optional) - Default: https://www.electronjs.org/headers - The URL to download Electron header files from
// types (optional) - Default: ['prod', 'optional'] - The types of modules to rebuild
// mode (optional) - The rebuild mode, either 'sequential' or 'parallel' - Default varies per platform (probably shouldn't mess with this one)

Expand Down
4 changes: 2 additions & 2 deletions src/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Rebuilder {
this.extraModules = options.extraModules || [];
this.onlyModules = options.onlyModules || null;
this.force = options.force || false;
this.headerURL = options.headerURL || 'https://electronjs.org/headers';
this.headerURL = options.headerURL || 'https://www.electronjs.org/headers';
this.types = options.types || defaultTypes;
this.mode = options.mode || defaultMode;
this.debug = options.debug || false;
Expand Down Expand Up @@ -388,7 +388,7 @@ class Rebuilder {
/* eslint-disable @typescript-eslint/camelcase */
env: Object.assign({}, process.env, {
USERPROFILE: path.resolve(os.homedir(), '.electron-gyp'),
npm_config_disturl: 'https://electronjs.org/headers',
npm_config_disturl: 'https://www.electronjs.org/headers',
npm_config_runtime: 'electron',
npm_config_arch: this.arch,
npm_config_target_arch: this.arch,
Expand Down

0 comments on commit 3ee5d4a

Please sign in to comment.