From 3fae8b8a26477bc8e799f698d821929dbc1b4b58 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Thu, 5 Sep 2024 19:53:02 +0200 Subject: [PATCH] Fix rubocop violations --- .../actions/ios/ios_generate_strings_file_from_code.rb | 8 ++++---- spec/ios_generate_strings_file_from_code_spec.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb index 9b1596771..0587d2244 100644 --- a/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb +++ b/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_generate_strings_file_from_code.rb @@ -3,10 +3,10 @@ module Actions class IosGenerateStringsFileFromCodeAction < Action def self.run(params) output_encoding = begin - Encoding.find(params[:output_encoding]) - rescue ArgumentError => error - UI.user_error!(error.message) - end + Encoding.find(params[:output_encoding]) + rescue ArgumentError => e + UI.user_error!(e.message) + end Dir.mktmpdir('genstrings-output-') do |tmpdir| # Build the command arguments diff --git a/spec/ios_generate_strings_file_from_code_spec.rb b/spec/ios_generate_strings_file_from_code_spec.rb index 7c874a672..af226dd86 100644 --- a/spec/ios_generate_strings_file_from_code_spec.rb +++ b/spec/ios_generate_strings_file_from_code_spec.rb @@ -68,8 +68,8 @@ def test_genstrings(params:, expected_dir_name:, expected_logs: nil, expected_fa return_value = [] begin return_value = run_described_fastlane_action(params) - rescue FastlaneCore::Interface::FastlaneError => error - user_errors << error.message + rescue FastlaneCore::Interface::FastlaneError => e + user_errors << e.message end # Assert: UI.messages, UI.user_error! and return value from the action