fix handling of redirect from asset download

This commit is contained in:
Alex Suraci
2016-07-09 18:32:35 -07:00
parent 12003714cf
commit 3a7443448e
72 changed files with 10743 additions and 680 deletions

View File

@@ -127,14 +127,14 @@ func (c *InCommand) Run(destDir string, request InRequest) (InResponse, error) {
}, nil
}
func (c *InCommand) downloadAsset(asset github.ReleaseAsset, destPath string) error {
func (c *InCommand) downloadAsset(asset *github.ReleaseAsset, destPath string) error {
out, err := os.Create(destPath)
if err != nil {
return err
}
defer out.Close()
content, err := c.github.DownloadReleaseAsset(asset)
content, err := c.github.DownloadReleaseAsset(*asset)
if err != nil {
return err
}