You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main.go
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ var (
49
49
indexURL=flag.String("indexURL", "https://downloads.arduino.cc/packages/package_staging_index.json", "The address from where to download the index json containing the location of upload tools")
50
50
requiredToolsAPILevel="v1"
51
51
httpProxy=flag.String("httpProxy", "", "Proxy server for HTTP requests")
52
+
httpsProxy=flag.String("httpsProxy", "", "Proxy server for HTTPS requests")
52
53
)
53
54
54
55
typeNullWriterint
@@ -141,6 +142,17 @@ func main() {
141
142
}
142
143
}
143
144
145
+
if*httpsProxy!="" {
146
+
log.Printf("Setting HTTPS_PROXY variable to %v", *httpProxy)
147
+
err:=os.Setenv("HTTPS_PROXY", *httpProxy)
148
+
iferr!=nil {
149
+
// The os.Setenv documentation doesn't specify how it can
150
+
// fail, so I don't know how to handle this error
151
+
// appropriately.
152
+
panic(err)
153
+
}
154
+
}
155
+
144
156
// move CORS to config file compatibility, Vagrant version
145
157
if*origins=="" {
146
158
log.Println("Patching config.ini for compatibility")
0 commit comments