Skip to content

Commit

Permalink
lint file.write instead of file.open
Browse files Browse the repository at this point in the history
  • Loading branch information
manegron committed May 29, 2024
1 parent fc2b48b commit 7d575d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/libraries/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 7d575d6

Please sign in to comment.