diff --git a/lib/travis/build/rake_tasks.rb b/lib/travis/build/rake_tasks.rb index 0d5b7715c9..291da0774b 100644 --- a/lib/travis/build/rake_tasks.rb +++ b/lib/travis/build/rake_tasks.rb @@ -58,7 +58,12 @@ def fetch_githubusercontent_file(from, host: 'raw.githubusercontent.com', end def latest_release_for(repo) - octokit.latest_release(repo)['tag_name'] + logger.info "Fetching releases from #{repo}" + + latest_release = octokit.latest_release(repo)['tag_name'] + raise "No releases found for #{repo}" if latest_release.empty? + + latest_release rescue raise "Could not get latest release for #{repo}" end