Skip to content

Commit b459a1c

Browse files
authored
Log platform and disambiguate error message if binary not found (#377)
1 parent 4bc7839 commit b459a1c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def self.run(params)
3434
timeout = get_upload_timeout(params)
3535

3636
binary_path = get_binary_path(platform, params)
37-
UI.user_error!("Couldn't find binary.") if binary_path.nil?
38-
UI.user_error!("Couldn't find binary at path #{binary_path}.") unless File.exist?(binary_path)
37+
UI.user_error!("Couldn't determine path for #{platform} binary.") if binary_path.nil?
38+
UI.user_error!("Couldn't find #{platform} binary at path #{binary_path}.") unless File.exist?(binary_path)
3939
binary_type = binary_type_from_path(binary_path)
4040

4141
# TODO(lkellogg): This sets the send timeout for all POST requests made by the client, but

spec/firebase_app_distribution_action_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,16 @@
226226
allow(action).to receive(:get_authorization).and_return(double('authorization', access_token: 'access-token'))
227227
end
228228

229-
it 'raises error if it cannot find a valid binary path' do
229+
it 'raises error if it cannot determine a valid binary path' do
230230
expect do
231231
action.run(params.merge(ipa_path: nil))
232-
end.to raise_error("Couldn't find binary.")
232+
end.to raise_error("Couldn't determine path for ios binary.")
233233
end
234234

235235
it 'raises error if binary does not exist' do
236236
expect do
237237
action.run(params)
238-
end.to raise_error("Couldn't find binary at path debug.ipa.")
238+
end.to raise_error("Couldn't find ios binary at path debug.ipa.")
239239
end
240240

241241
describe 'with android app' do

0 commit comments

Comments
 (0)