lib/gym/error_handler.rb in gym-1.11.2 vs lib/gym/error_handler.rb in gym-1.11.3
- old
+ new
@@ -4,11 +4,11 @@
class ErrorHandler
class << self
# @param [String] The output of the errored build
# This method should raise an exception in any case, as the return code indicated a failed build
def handle_build_error(output)
- # The order of the handling below is import
+ # The order of the handling below is important
case output
when /Your build settings specify a provisioning profile with the UUID/
print "Invalid code signing settings"
print "Your project defines a provisioning profile which doesn't exist on your local machine"
print "You can use sigh (https://github.com/fastlane/fastlane/tree/master/sigh) to download and install the provisioning profile"
@@ -48,10 +48,11 @@
print "You'll have to restart your shell session after updating the file."
print "If you are using zshell or another shell, make sure to edit the correct bash file."
print "For more information visit this stackoverflow answer:"
print "https://stackoverflow.com/a/17031697/445598"
end
+ print_full_log_path
UI.user_error!("Error building the application - see the log above")
end
# @param [Array] The output of the errored build (line by line)
# This method should raise an exception in any case, as the return code indicated a failed build
@@ -89,10 +90,11 @@
print standard_output if standard_output
print "There was an error exporting your application"
print "Unfortunately the new Xcode export API is unstable and causes problems on some projects"
print "You can temporary use the :use_legacy_build_api option to get the build to work again"
end
+ print_full_log_path
UI.user_error!("Error packaging up the application")
end
def handle_empty_archive
print "The generated archive is invalid, this can have various reasons:"
@@ -117,9 +119,16 @@
end
# Just to make things easier
def print(text)
UI.error text
+ end
+
+ def print_full_log_path
+ return if Gym.config[:disable_xcpretty]
+ log_path = Gym::BuildCommandGenerator.xcodebuild_log_path
+ UI.error("📋 For a more detailed error log, check the full log at:")
+ UI.error("📋 #{log_path}")
end
end
end
end