Skip to content

Commit

Permalink
fixed git submodule tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zworkb committed Apr 12, 2024
1 parent 6d10384 commit c8460e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mxdev/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ def add_file(self, fname, msg=None):
def add_submodule(self, submodule: "GitRepo", submodule_name: str):
assert isinstance(submodule, GitRepo)
assert isinstance(submodule_name, str)

# Allow file protocol
# This is needed for the submodule to be added from a local path
self("git config --global protocol.file.allow always")
self(f"git submodule add {submodule.url}")
self("git add .gitmodules")
self(f"git add {submodule_name}")
Expand Down

0 comments on commit c8460e2

Please sign in to comment.