We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 464dbb5 commit 3b4c4e2Copy full SHA for 3b4c4e2
cli/cli.go
@@ -263,5 +263,14 @@ func preRun(cmd *cobra.Command, args []string) {
263
netConf := downloader.Config{
264
RequestHeaders: globals.NewHTTPClientHeader(),
265
}
266
+ if viper.IsSet("network.proxy") {
267
+ proxy := viper.GetString("network.proxy")
268
+ if _, err := url.Parse(proxy); err != nil {
269
+ feedback.Error("Invalid network.proxy '" + proxy + "': " + err.Error())
270
+ os.Exit(errorcodes.ErrBadArgument)
271
+ }
272
+ netConf.ProxyURL = proxy
273
+ logrus.Infof("Using proxy %s", proxy)
274
275
downloader.SetDefaultConfig(netConf)
276
0 commit comments