Skip to content

Commit

Permalink
fix(print): removed leftover print
Browse files Browse the repository at this point in the history
  • Loading branch information
StanGirard committed Sep 9, 2022
1 parent 2bfd720 commit 0269ce7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions plugins/commons/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func (c *Plugin) Install() (string, error) {

log.Printf("[DEBUG] Download checksums.txt")
checksumsFile, err := c.downloadToTempFile(assets["checksums.txt"])
fmt.Println("Debug 1")
if checksumsFile != nil {
defer os.Remove(checksumsFile.Name())
}
Expand Down Expand Up @@ -172,23 +171,20 @@ func (c *Plugin) downloadToTempFile(asset *github.ReleaseAsset) (*os.File, error

ctx := context.Background()
client := newGitHubClient(ctx)

log.Printf("[DEBUG] Request to https://api.github.com/repos/%s/%s/releases/assets/%d", c.SourceOwner, c.SourceRepo, asset.GetID())
log.Printf("[DEBUG] Request to https://api.github.com/repos/%s/%s/releases/assets/%d", c.SourceOwner, c.SourceRepo, asset.GetID())
downloader, _, err := client.Repositories.DownloadReleaseAsset(ctx, c.SourceOwner, c.SourceRepo, asset.GetID(), http.DefaultClient)
if err != nil {
return nil, err
}
fmt.Println("Debug 2")
file, err := os.CreateTemp("", "yatas-tmp-*")
if err != nil {
return nil, err
}
fmt.Println("Debug 3")

fmt.Println(file.Name())
fmt.Println(downloader)
if _, err = io.Copy(file, downloader); err != nil {
fmt.Println("Debug 4")
return file, err
}
downloader.Close()
Expand Down

0 comments on commit 0269ce7

Please sign in to comment.