diff --git a/fastlane/actions/modify_config_json_file.rb b/fastlane/actions/modify_config_json_file.rb index f87d7b555..2d43c0236 100644 --- a/fastlane/actions/modify_config_json_file.rb +++ b/fastlane/actions/modify_config_json_file.rb @@ -32,7 +32,11 @@ def self.replace_fields_value(fields, data) file = File.read(path) config_json = JSON.parse(file) app_config_json = JSON.parse(data) - config_json.each{|key, value| config_json[key] = app_config_json[key] if app_config_json.key?(key) && fields.include?(key)} + config_json.each do |key, value| + if app_config_json.key?(key) && fields.include?(key) + config_json[key] = app_config_json[key] + end + end File.open(path,"w") do |f| f.puts JSON.pretty_generate(config_json) end