We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94ba261 commit c1c9aceCopy full SHA for c1c9ace
1 file changed
src/somesy/pyproject/writer.py
@@ -65,6 +65,11 @@ def save(self, path: Optional[Path] = None) -> None:
65
"""Save the pyproject file."""
66
path = path or self.path
67
68
+ if not path.is_file():
69
+ with open(path, "w") as f:
70
+ tomlkit.dump(self._data, f)
71
+ return
72
+
73
with open(path, "r") as f:
74
# tomlkit formatting sometimes creates empty lines, dont change if context is not changed
75
existing_data = f.read()
0 commit comments