Skip to content
Merged
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func runDownload(cfg config.Config, flags *pflag.FlagSet, args []string) error {
return err
}

var successes int
for _, sf := range download.payload.files() {
url, err := sf.url()
if err != nil {
Expand All @@ -98,8 +99,10 @@ func runDownload(cfg config.Config, flags *pflag.FlagSet, args []string) error {
defer res.Body.Close()

if res.StatusCode != http.StatusOK {
// TODO: deal with it
continue
if successes > 0 {
Comment thread
glennj marked this conversation as resolved.
fmt.Fprintf(Err, "Downloaded %d/%d files", successes, len(download.payload.files()))
Comment thread
IsaacG marked this conversation as resolved.
Outdated
}
return fmt.Errorf("received HTTP/%d when fetching %#v", res.StatusCode, url)
}

path := sf.relativePath()
Expand Down