It doesn't make sense that we look at the env variables first before user-configured values. It took me hours to troubleshoot why my custom electron binary url wasn't taking when using the mirror configuration option and realized through console logging various packages that my env var has NPM_CONFIG_ELECTRON_MIRROR set.
This PR re-orders how the URL is calculated by first checking the config.Mirror option first before the env vars.
This addresses an issue around download URL calculation as discovered in https://github.com/electron-userland/electron-builder/issues/6445#issuecomment-1971891352
It doesn't make sense that we look at the env variables first before user-configured values. It took me hours to troubleshoot why my custom electron binary url wasn't taking when using the
mirror
configuration option and realized through console logging various packages that my env var hasNPM_CONFIG_ELECTRON_MIRROR
set.This PR re-orders how the URL is calculated by first checking the
config.Mirror
option first before the env vars.