Skip to content

Commit

Permalink
fix: Use config.mirror first before env variables for download URL
Browse files Browse the repository at this point in the history
  • Loading branch information
theogravity committed Feb 29, 2024
1 parent 0bc38fb commit d45f97f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/electron/electronDownloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ func downloadElectron(configs []ElectronDownloadOptions) ([]string, error) {
}

func getBaseUrl(config *ElectronDownloadOptions) string {
v := os.Getenv("NPM_CONFIG_ELECTRON_MIRROR")
v := config.Mirror
if len(v) == 0 {
v = os.Getenv("npm_config_electron_mirror")
v = os.Getenv("NPM_CONFIG_ELECTRON_MIRROR")
}
if len(v) == 0 {
v = os.Getenv("ELECTRON_MIRROR")
v = os.Getenv("npm_config_electron_mirror")
}
if len(v) == 0 {
v = config.Mirror
v = os.Getenv("ELECTRON_MIRROR")
}
if len(v) == 0 {
if strings.Contains(config.Version, "-nightly.") {
Expand Down

0 comments on commit d45f97f

Please sign in to comment.