mintro: write humman-readable JSON

Signed-off-by: Filipe Laíns <lains@riseup.net>
pull/13282/head
Filipe Laíns 9 months ago committed by Jussi Pakkanen
parent 8603bb4919
commit e5aed6ac8f
  1. 2
      mesonbuild/mintro.py

@ -592,7 +592,7 @@ def write_intro_info(intro_info: T.Sequence[T.Tuple[str, T.Union[dict, T.List[T.
out_file = os.path.join(info_dir, f'intro-{kind}.json')
tmp_file = os.path.join(info_dir, 'tmp_dump.json')
with open(tmp_file, 'w', encoding='utf-8') as fp:
json.dump(data, fp)
json.dump(data, fp, indent=2)
fp.flush() # Not sure if this is needed
os.replace(tmp_file, out_file)
updated_introspection_files.append(kind)

Loading…
Cancel
Save