Skip to content

Commit 4291f15

Browse files
committed
Add an option to retry when GlotPress download fails
1 parent 57e7e31 commit 4291f15

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def self.download_glotpress_export_file(project_url:, locale:, filters:)
291291
uri.open(options) { |f| Nokogiri::XML(f.read.gsub("\t", ' '), nil, Encoding::UTF_8.to_s) }
292292
rescue StandardError => e
293293
UI.error "Error downloading #{locale} - #{e.message}"
294+
retry if UI.confirm("Retry downloading `#{locale}`?")
294295
return nil
295296
end
296297
end

lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def self.download_glotpress_export_file(project_url:, locale:, filters:, destina
152152
IO.copy_stream(uri.open(options), destination)
153153
rescue StandardError => e
154154
UI.error "Error downloading locale `#{locale}` — #{e.message} (#{uri})"
155+
retry if UI.confirm("Retry downloading `#{locale}`?")
155156
return nil
156157
end
157158
end

0 commit comments

Comments
 (0)