Skip to content

Commit

Permalink
fix: touch_path before write
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueGlassBlock committed Nov 16, 2024
1 parent 931455e commit b9e78e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kayaku/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def register_batch(self, domain_map: dict[str, type[DataClass]]) -> None:
self.bootstrap(paths)

def bootstrap_file(self, path: Path, store: _FileEntry) -> None:
path.with_suffix(".schema.json").write_text(
touch_path(path.with_suffix(".schema.json")).write_text(
dumps(store.get_schema()), encoding="utf-8"
)
exceptions = []
Expand Down Expand Up @@ -283,6 +283,6 @@ def save(self, config: type[DataClass] | DataClass | DomainIdent) -> None:
cls_entry.path.write_text(
dumps(self._core.prettifier.prettify(document), endline=True), "utf-8"
)
cls_entry.path.with_suffix(".schema.json").write_text(
dumps(self._core.files[cls_entry.path].get_schema()), "utf-8"
)
touch_path(cls_entry.path.with_suffix(".schema.json")).with_suffix(
".schema.json"
).write_text(dumps(self._core.files[cls_entry.path].get_schema()), "utf-8")

0 comments on commit b9e78e3

Please sign in to comment.