Closed ekluzek closed 1 week ago
Here's the simple fix that gets it to work:
diff --git a/.lib/git-fleximod/git_fleximod/git_fleximod.py b/.lib/git-fleximod/git_fleximod/git_fleximod.py
index e1b8f48..ed24c4e 100755
--- a/.lib/git-fleximod/git_fleximod/git_fleximod.py
+++ b/.lib/git-fleximod/git_fleximod/git_fleximod.py
@@ -547,7 +547,7 @@ def submodules_test(gitmodules, root_dir):
# and that sparse checkout files exist
for name in gitmodules.sections():
url = gitmodules.get(name, "url")
- fxurl = gitmodules.get(name, "fxDONOTMODIFYurl")
+ fxurl = gitmodules.get(name, "fxDONOTUSEurl")
fxsparse = gitmodules.get(name, "fxsparse")
path = gitmodules.get(name, "path")
fxurl = fxurl[:-4] if fxurl.endswith(".git") else fxurl
Beyond above it might be good to add some error checking after the gitmodules.get to make sure a value was returned, and if not to return with an error that the field wasn't found.
Any contributions you would like to make to add more error checking would be gratefully accepted. Can you please issue your change as a PR?
"git-fleximod test" is failing for me both in ctsm and CESM. This happens whether or not I first run "git-fleximod update" beforehand.
The problem is that the code is looking for fxDONOTMODIFYurl rather than fxDONOTUSEurl. So there is a simple fix.
However, it also might be good to add more error checking around getting variables and making sure they are valid before doing something with them.