diff --git a/fouroversix/scripts/resources.py b/fouroversix/scripts/resources.py index 9707616e..97aea60d 100644 --- a/fouroversix/scripts/resources.py +++ b/fouroversix/scripts/resources.py @@ -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