mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-15 08:42:34 +00:00
Make Task check status of package download instead of assuming it succeeded
This commit is contained in:
@@ -617,9 +617,11 @@ class W3DHub
|
||||
def package_fetch(package, &block)
|
||||
logger.info(LOG_TAG) { "Downloading: #{package.category}:#{package.subcategory}:#{package.name}-#{package.version}" }
|
||||
|
||||
Api.package(package) do |chunk, remaining_bytes, total_bytes|
|
||||
status_okay = Api.package(package) do |chunk, remaining_bytes, total_bytes|
|
||||
block&.call(chunk, remaining_bytes, total_bytes)
|
||||
end
|
||||
|
||||
fail!("Failed to retrieve package: (#{package.category}:#{package.subcategory}:#{package.name}:#{package.version})") unless status_okay
|
||||
end
|
||||
|
||||
def verify_package(package, &block)
|
||||
|
||||
Reference in New Issue
Block a user