write progress while downloading assets

[#76848252]

Signed-off-by: Alex Suraci <asuraci@pivotal.io>
This commit is contained in:
Chris Brown
2015-02-18 09:54:44 -08:00
committed by Alex Suraci
parent 8b3dc6edbe
commit 2878392b08
3 changed files with 6 additions and 3 deletions

View File

@@ -14,11 +14,13 @@ import (
type InCommand struct {
github GitHub
writer io.Writer
}
func NewInCommand(github GitHub) *InCommand {
func NewInCommand(github GitHub, writer io.Writer) *InCommand {
return &InCommand{
github: github,
writer: writer,
}
}
@@ -81,6 +83,7 @@ func (c *InCommand) Run(destDir string, request InRequest) (InResponse, error) {
continue
}
fmt.Fprintf(c.writer, "downloading asset: %s\n", *asset.Name)
err := c.downloadFile(url, path)
if err != nil {
return InResponse{}, nil