make dirs for new files

This commit is contained in:
Paul Gauthier 2023-05-11 22:55:26 -07:00
parent 89149b307d
commit 9ef50d8f3d

View file

@ -78,7 +78,8 @@ class Coder:
for fname in abs_fnames:
if not fname.exists():
self.console.print(f"[bright_black]Creating {fname}")
fname.touch(parents=True)
fname.parent.mkdir(parents=True, exist_ok=True)
fname.touch()
try:
repo_path = git.Repo(fname, search_parent_directories=True).git_dir
repo_paths.append(repo_path)