fastlane/lib/fastlane/fast_file.rb in fastlane-2.108.0 vs fastlane/lib/fastlane/fast_file.rb in fastlane-2.109.0

- old
+ new

@@ -54,13 +54,18 @@ # rubocop:disable Security/Eval eval(data, parsing_binding, relative_path) # using eval is ok for this case # rubocop:enable Security/Eval rescue SyntaxError => ex - line = ex.to_s.match(/#{Regexp.escape(relative_path)}:(\d+)/)[1] - UI.content_error(data, line) - UI.user_error!("Syntax error in your Fastfile on line #{line}: #{ex}") + match = ex.to_s.match(/#{Regexp.escape(relative_path)}:(\d+)/) + if match + line = match[1] + UI.content_error(data, line) + UI.user_error!("Syntax error in your Fastfile on line #{line}: #{ex}") + else + UI.user_error!("Syntax error in your Fastfile: #{ex}") + end end end self end @@ -199,12 +204,10 @@ def fastlane_require(gem_name) FastlaneRequire.install_gem_if_needed(gem_name: gem_name, require_gem: true) end def generated_fastfile_id(id) - # This value helps us track success/failure metrics for Fastfiles we - # generate as part of an automated process. - ENV['GENERATED_FASTFILE_ID'] = id + UI.important("The `generated_fastfile_id` action was deprecated, you can remove the line from your `Fastfile`") end def import(path = nil) UI.user_error!("Please pass a path to the `import` action") unless path