Skip to content

Commit

Permalink
create parent if it doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Apr 23, 2024
1 parent 5398ef4 commit 46a74ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git_fleximod/git_fleximod.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ def single_submodule_checkout(
f.write("gitdir: " + os.path.relpath(newpath, start=repodir))

if not os.path.exists(repodir):
parent = os.path.dirname(repodir)
if not os.path.isdir(parent):
os.makedirs(parent)
git.git_operation("submodule", "add", "--name", name, "--", url, path)

if not repo_exists or not tmpurl:
Expand Down

0 comments on commit 46a74ac

Please sign in to comment.