Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func (o *downloadOption) preRunE(cmd *cobra.Command, args []string) (err error)
return
}
o.name = ins.Name
cmd.Printf("start to download from %s\n", targetURL)
}
o.URL = targetURL

Expand Down Expand Up @@ -139,6 +138,7 @@ func (o *downloadOption) runE(cmd *cobra.Command, args []string) (err error) {
return
}

cmd.Printf("start to download from %s\n", o.URL)
if o.Thread <= 1 {
err = pkg.DownloadWithContinue(o.URL, o.Output, o.ContinueAt, -1, 0, o.ShowProgress)
} else {
Expand Down
2 changes: 0 additions & 2 deletions cmd/install.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"fmt"
"github.com/linuxsuren/http-downloader/pkg/installer"
"github.com/spf13/cobra"
"runtime"
Expand Down Expand Up @@ -70,7 +69,6 @@ func (o *installOption) runE(cmd *cobra.Command, args []string) (err error) {
Output: o.Output,
CleanPackage: o.CleanPackage,
}
fmt.Println(process)
err = process.Install()
return
}
14 changes: 8 additions & 6 deletions pkg/installer/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (o *Installer) ProviderURLParse(path string, acceptPreRelease bool) (url st
}
}

fmt.Printf("prepare to download %s/%s\n", org, repo)
fmt.Printf("target package is %s/%s\n", org, repo)
} else {
err = fmt.Errorf("only support format xx, xx/xx or xx/xx/xx")
return
Expand All @@ -120,11 +120,13 @@ func (o *Installer) ProviderURLParse(path string, acceptPreRelease bool) (url st
}
o.Name = name

// fetch the latest config
fmt.Println("start to fetch the config")
if err = FetchConfig(); err != nil {
err = fmt.Errorf("unable to fetch the latest config, error: %v", err)
return
if o.Fetch {
// fetch the latest config
fmt.Println("start to fetch the config")
if err = FetchConfig(); err != nil {
err = fmt.Errorf("unable to fetch the latest config, error: %v", err)
return
}
}

// try to parse from config
Expand Down