Skip to content

Commit

Permalink
fix: ci error
Browse files Browse the repository at this point in the history
Signed-off-by: Bird <aflybird0@gmail.com>
  • Loading branch information
aFlyBird0 authored and steinliber committed Oct 11, 2022
1 parent 6ffd660 commit 06eca74
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions pkg/util/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,11 @@ func (d *Downloader) Download(url, filename, targetDir string) (size int64, err
}

if err != nil {
log.Error(err)
return 0, err
}

// rename, tmp file to real file
if err = os.Rename(pluginTmpLocation, pluginLocation); err != nil {
log.Error(err)
return 0, err
}
return size, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/scm/github/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var _ = Describe("DownloadAsset", func() {
Expect(ghClient).NotTo(Equal(nil))
err = ghClient.DownloadAsset(tagName, assetName, ".")
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring(fmt.Sprintf("failed to get the filename from url: %s", downloadUrl)))
Expect(err.Error()).To(ContainSubstring("filename must not be dir"))
})
})

Expand Down

0 comments on commit 06eca74

Please sign in to comment.