diff --git a/.lib/git-fleximod/.github/workflows/pytest.yaml b/.lib/git-fleximod/.github/workflows/pytest.yaml index 0868dd9a3..6cb8102b9 100644 --- a/.lib/git-fleximod/.github/workflows/pytest.yaml +++ b/.lib/git-fleximod/.github/workflows/pytest.yaml @@ -18,7 +18,7 @@ jobs: # reference the matrixe python version here. - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' # Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow # from installing Poetry every time, which can be slow. Note the use of the Poetry version @@ -29,7 +29,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.local - key: poetry-1.7.1 + key: poetry-1.8.2 # Install Poetry. You could do this manually, or there are several actions that do this. # `snok/install-poetry` seems to be minimal yet complete, and really just calls out to @@ -42,7 +42,7 @@ jobs: # cache it. - uses: snok/install-poetry@v1 with: - version: 1.7.1 + version: 1.8.2 virtualenvs-create: true virtualenvs-in-project: true @@ -74,4 +74,7 @@ jobs: git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" poetry run pytest + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 diff --git a/.lib/git-fleximod/git_fleximod/gitinterface.py b/.lib/git-fleximod/git_fleximod/gitinterface.py index f0dc19090..fb20883cd 100644 --- a/.lib/git-fleximod/git_fleximod/gitinterface.py +++ b/.lib/git-fleximod/git_fleximod/gitinterface.py @@ -82,6 +82,8 @@ def config_get_value(self, section, name): def config_set_value(self, section, name, value): if self._use_module: with self.repo.config_writer() as writer: + if "." in section: + section = section.replace("."," \"")+'"' writer.set_value(section, name, value) writer.release() # Ensure changes are saved else: diff --git a/.lib/git-fleximod/git_fleximod/submodule.py b/.lib/git-fleximod/git_fleximod/submodule.py index 30a53f00f..c939d54bc 100644 --- a/.lib/git-fleximod/git_fleximod/submodule.py +++ b/.lib/git-fleximod/git_fleximod/submodule.py @@ -186,7 +186,7 @@ def _add_remote(self, git): return newremote else: i = 0 - while "newremote" in remotes: + while newremote in remotes: i = i + 1 newremote = f"newremote.{i:02d}" else: @@ -303,9 +303,9 @@ def sparse_checkout(self): print(f"Error checking out {self.name:>20} at {self.fxtag}") else: print(f"Successfully checked out {self.name:>20} at {self.fxtag}") - rgit.config_set_value(f'submodule "{self.name}"', "active", "true") - rgit.config_set_value(f'submodule "{self.name}"', "url", self.url) - rgit.config_set_value(f'submodule "{self.name}"', "path", self.path) + rgit.config_set_value('submodule.' + self.name, "active", "true") + rgit.config_set_value('submodule.' + self.name, "url", self.url) + rgit.config_set_value('submodule.' + self.name, "path", self.path) def update(self): """ diff --git a/.lib/git-fleximod/git_fleximod/utils.py b/.lib/git-fleximod/git_fleximod/utils.py index eef15113a..c4f43d523 100644 --- a/.lib/git-fleximod/git_fleximod/utils.py +++ b/.lib/git-fleximod/git_fleximod/utils.py @@ -312,10 +312,7 @@ def execute_subprocess(commands, status_to_caller=False, output_to_caller=False) "returned status {0}".format(error.returncode) ) msg = failed_command_msg(msg_context, commands, output=error.output) - if return_to_caller: - logging.warning(error) - logging.warning(msg) - else: + if not return_to_caller: logging.error(error) logging.error(msg) log_process_output(error.output)