Skip to content

Commit

Permalink
[build] support auto gen config for json
Browse files Browse the repository at this point in the history
  • Loading branch information
SamulKyull authored and SamulKyull committed Dec 15, 2024
1 parent 1b227b5 commit e1568e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/gen_vscode_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ def generate_c_cpp_properties(config):

# Write the generated c_cpp_properties.json content to a file
def write_c_cpp_properties_json(output_file_path, cpp_properties):
with open(output_file_path, "w") as json_file:
json.dump(
cpp_properties, json_file, indent=4
) # Write formatted JSON to the file
try:
with open(output_file_path, "w") as json_file:
json.dump(cpp_properties, json_file, indent=4)
except FileNotFoundError:
pass


# Main function to execute the process
Expand Down

0 comments on commit e1568e0

Please sign in to comment.