File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ func (opt *Version) Run(ctx app.Context) app.Error {
5353
5454 origin , v := fetchVersionInfo (versionCheckers )
5555 close (stopTicker )
56+ ctx .Print ("\n " )
5657 if v == nil {
5758 return app .NewError (
5859 "Failed to retrieve version information." ,
@@ -61,7 +62,6 @@ func (opt *Version) Run(ctx app.Context) app.Error {
6162 )
6263 }
6364
64- ctx .Print ("\n " )
6565 ctx .Debug (func () {
6666 ctx .Print ("Fetched from: " + origin .url + "\n " )
6767 })
@@ -107,7 +107,10 @@ func progressTicker(onTick func(), stop chan bool) {
107107// one after the other. It returns the first response that succeeds.
108108func fetchVersionInfo (origins []versionChecker ) (* versionChecker , versionInfo ) {
109109 for _ , origin := range origins {
110- req , _ := http .NewRequest (http .MethodGet , origin .url , nil )
110+ req , err := http .NewRequest (http .MethodGet , origin .url , nil )
111+ if err != nil {
112+ continue
113+ }
111114 res , err := (& http.Client {
112115 Timeout : time .Second * 5 ,
113116 }).Do (req )
You can’t perform that action at this time.
0 commit comments