@@ -10,20 +10,24 @@ def self.get_bugsnag_cli_path(params)
1010 bundled_bugsnag_cli_path = self . bundled_bugsnag_cli_path
1111 bundled_bugsnag_cli_version = Gem ::Version . new ( `#{ bundled_bugsnag_cli_path } --version` . scan ( /(?:\d +\. ?){3}/ ) . first )
1212
13- bugsnag_cli_path = params [ :bugsnag_cli_path ] || bundled_bugsnag_cli_path
13+ if params [ :bugsnag_cli_path ]
14+ bugsnag_cli_path = params [ :bugsnag_cli_path ] || bundled_bugsnag_cli_path
1415
15- bugsnag_cli_version = Gem ::Version . new ( `#{ bugsnag_cli_path } --version` . scan ( /(?:\d +\. ?){3}/ ) . first )
16+ bugsnag_cli_version = Gem ::Version . new ( `#{ bugsnag_cli_path } --version` . scan ( /(?:\d +\. ?){3}/ ) . first )
1617
17- if bugsnag_cli_version < bundled_bugsnag_cli_version
18- UI . user_error! ( "Your bugsnag-cli is outdated, please upgrade to at least version #{ bundled_bugsnag_cli_version } and start your lane again!" )
18+ if bugsnag_cli_version < bundled_bugsnag_cli_version
19+ UI . user_error! ( "Your bugsnag-cli is outdated, please upgrade to at least version #{ bundled_bugsnag_cli_version } and start your lane again!" )
20+ end
21+ bugsnag_cli_path
22+ else
23+ bundled_bugsnag_cli_path
1924 end
20-
21- UI . success ( "Using bugsnag-cli #{ bugsnag_cli_version } " )
22- bugsnag_cli_path
2325 end
2426
2527 def self . run ( params )
2628 bugsnag_cli_path = get_bugsnag_cli_path ( params )
29+ UI . verbose ( "Using bugsnag-cli from path: #{ bugsnag_cli_path } " )
30+
2731 # If we have not explicitly set an API key through env, or parameter
2832 # input in Fastfile, find an API key in the Info.plist in config_file param
2933 api_key = params [ :api_key ]
@@ -63,7 +67,7 @@ def self.run(params)
6367 params [ :xcode_project ]
6468 )
6569 bugsnag_cli_command = "#{ bugsnag_cli_path } upload dsym #{ args . join ( ' ' ) } "
66- UI . message ( "Running command: #{ bugsnag_cli_command } " )
70+ UI . verbose ( "Running command: #{ bugsnag_cli_command } " )
6771 success = Kernel . system ( bugsnag_cli_command )
6872 if success
6973 UI . success ( "Uploaded dSYMs in #{ dsym_path } " )
@@ -325,4 +329,4 @@ def self.bin_folder(filename)
325329 end
326330 end
327331 end
328- end
332+ end
0 commit comments