diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aafdf49..7a9b5c9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,10 +24,12 @@ and this project adheres to [Semantic Versioning][semver]. ### Fixed +- Do not remove authentication repository folder when running `taf repo validate` ([267]) - fix git push - remove pygit2 push implementation which does not fully support ssh ([263]) - Warn when git object cleanup fails (`idx`,`pack`) and include cleanup warning message ([259]) +[267]: https://github.com/openlawlibrary/taf/pull/267 [266]: https://github.com/openlawlibrary/taf/pull/266 [263]: https://github.com/openlawlibrary/taf/pull/263 [261]: https://github.com/openlawlibrary/taf/pull/261 diff --git a/taf/updater/updater.py b/taf/updater/updater.py index eb66c09e..3b55ccd5 100644 --- a/taf/updater/updater.py +++ b/taf/updater/updater.py @@ -635,11 +635,6 @@ def _commits_ret(commits, existing_repo, update_successful): try: commits = None - users_repo_existed = False - - # first clone the validation repository in temp. this is needed because tuf expects auth_repo_name to be valid (not None) - # and in the right format (seperated by '/'). this approach covers a case where we don't know authentication repo path upfront. - auth_repo_name = _clone_validation_repo(url, auth_repo_name, default_branch) # check whether the directory that runs clone exists or contains additional files. # we need to check the state of folder before running tuf. Resolves issue #22 # if auth_repo_name isn't specified then the current directory doesn't contain additional files. @@ -649,6 +644,10 @@ def _commits_ret(commits, existing_repo, update_successful): else True ) + # first clone the validation repository in temp. this is needed because tuf expects auth_repo_name to be valid (not None) + # and in the right format (seperated by '/'). this approach covers a case where we don't know authentication repo path upfront. + auth_repo_name = _clone_validation_repo(url, auth_repo_name, default_branch) + repository_updater = tuf_updater.Updater( auth_repo_name, repository_mirrors, GitUpdater ) diff --git a/taf/utils.py b/taf/utils.py index 14eb7b4d..eb8329ee 100644 --- a/taf/utils.py +++ b/taf/utils.py @@ -228,7 +228,7 @@ def on_rm_error(_func, path, _exc_info): os.unlink(path) except (OSError, PermissionError) as e: taf_logger.warning( - "Failed to clean up temporary update files: {}. This is a known issue when running TAF in a subprocess. You could consider upgrading taf to see if cleanup errors persist", + "WARNING: Failed to clean up temporary update files: {}. This is a known issue when running TAF in a subprocess. You could consider upgrading taf to see if cleanup errors persist", e, ) pass