Refactor tag_path creation in parse-label.py
All checks were successful
自动生成 label / Generate-label (push) Successful in 51s

This commit is contained in:
shenjack 2023-12-14 18:23:27 +08:00
parent e44e4d132c
commit 73a6ec94e6
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -23,7 +23,7 @@ class TagParser(Options):
tag_toml = dumps(self.tags)
tag_path = self.module_root / ".." / "build" / "tags.toml"
tag_path.mkdir(parents=True, exist_ok=True)
tag_path.parent.mkdir(parents=True, exist_ok=True)
tag_path.touch(exist_ok=True)
with open(tag_path, 'w', encoding='utf-8') as file:
file.write(tag_toml)