Skip to content

Commit 2e85b71

Browse files
authored
Don't throw an exception if there are no testers with UDIDs (#363)
* Don't throw an exception if there are no testers with UDIDs - instead delete the specified output file. * Bump version to 0.9.0.pre.4
1 parent 134f417 commit 2e85b71

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_get_udids.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def self.run(params)
2828
end
2929
udids = client.get_project_tester_udids(project_name(project_number)).tester_udids
3030

31-
if udids.empty?
32-
UI.important("App Distribution fetched 0 tester UDIDs. Nothing written to output file.")
31+
if udids.to_a.empty?
32+
File.delete(params[:output_file]) if File.exist?(params[:output_file])
33+
UI.important("App Distribution fetched 0 tester UDIDs. Removed output file.")
3334
else
3435
write_udids_to_file(udids, params[:output_file])
3536
UI.success("🎉 App Distribution tester UDIDs written to: #{params[:output_file]}")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Fastlane
22
module FirebaseAppDistribution
3-
VERSION = "0.9.0.pre.3"
3+
VERSION = "0.9.0.pre.4"
44
end
55
end

0 commit comments

Comments
 (0)