Skip to content

Commit

Permalink
Fixed linter warning
Browse files Browse the repository at this point in the history
   if err != nil {
      ~~~~~~~~~~

Impossible error condition `nil != nil`
  • Loading branch information
cmaglie committed Mar 5, 2024
1 parent 03b09ab commit fd1c4c4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/arduino/cores/packagemanager/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ func (pmb *Builder) installMissingProfilePlatform(platformRef *sketch.ProfilePla
indexesToDownload = append(indexesToDownload, platformRef.PlatformIndexURL)
}
for _, indexURL := range indexesToDownload {
if err != nil {
taskCB(&rpc.TaskProgress{Name: tr("Error downloading %s", indexURL)})
return &cmderrors.FailedDownloadError{Message: tr("Error downloading %s", indexURL), Cause: err}
}
indexResource := resources.IndexResource{URL: indexURL}
if err := indexResource.Download(tmpPmb.IndexDir, downloadCB); err != nil {
taskCB(&rpc.TaskProgress{Name: tr("Error downloading %s", indexURL)})
Expand Down

0 comments on commit fd1c4c4

Please sign in to comment.