Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions fouroversix/scripts/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,16 @@ def get_remote_url(self) -> str:
config = configparser.ConfigParser()
config.read_string(gitmodules_contents)

url = None
for section in config.sections():
if config[section]["path"] == self.get_local_path():
url = config[section]["url"]
break

if url is None:
msg = f"Submodule {self.get_local_path()} not found in .gitmodules"
raise ValueError(msg)

if url.startswith("https://"):
return url

Expand Down