From 7d575d603fda33c67d041a21b9d261f184145724 Mon Sep 17 00:00:00 2001 From: Miguel Negron Date: Wed, 29 May 2024 01:06:33 +0100 Subject: [PATCH] lint file.write instead of file.open --- resources/libraries/helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/libraries/helper.rb b/resources/libraries/helper.rb index 9d66789..6d8b371 100644 --- a/resources/libraries/helper.rb +++ b/resources/libraries/helper.rb @@ -49,7 +49,7 @@ def nginx_certs(app, cdomain) # Create S3 certificate ret_json = create_json_cert(app, cdomain) system('mkdir -p /var/chef/data/data_bag/certs') - File.open("/var/chef/data/data_bag/certs/#{app}.json", 'w') { |file| file.write(ret_json.to_json) } + File.write("/var/chef/data/data_bag/certs/#{app}.json", ret_json.to_json) end # Upload cert to data bag if File.exist?('/root/.chef/knife.rb')