Skip to content

Commit

Permalink
Pretty generate json
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielmbl committed Aug 15, 2024
1 parent a91ea63 commit a11ea57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/generators/chromium/pdf/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ def update_json_file(file_name)
data['buildpacks'] ||= []

yield data
File.write(file_name, ActiveSupport::JSON.encode(data))

File.write(file_name, pretty_json(data))
end

def pretty_json(data)
require 'json'
JSON.pretty_generate(data)
end
end
end
Expand Down

0 comments on commit a11ea57

Please sign in to comment.