Fix relative dir not being made absolute

This commit is contained in:
Jose Stovall 2022-11-08 10:20:16 -06:00 • committed by GitHub
commit e52ee4dcd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,8 +21,8 @@ def update_template(template_path: str, out_path: str, replacers: dict):
replacers (dict): a Dict[str,str] whose keys are in the template, replacers (dict): a Dict[str,str] whose keys are in the template,
and whose values will replace their keys in the template and whose values will replace their keys in the template
""" """
if not os.path.exists("../out"): if not os.path.exists(rel_to_abspath("../out")):
os.mkdir("../out") os.mkdir(rel_to_abspath("../out"))
with open(template_path, "r", encoding="utf-8") as file_handle: with open(template_path, "r", encoding="utf-8") as file_handle:
data = file_handle.read() data = file_handle.read()
for key in replacers: for key in replacers: