Skip to content

Commit

Permalink
refactor: debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
nfelt14 committed Aug 19, 2024
1 parent e481e29 commit 1c66fa3
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,15 @@ def _update_pre_commit_dependencies(
repository_root_directory: The root directory of the repository.
"""
_run_cmd_in_subprocess(
f'git config --global --add safe.directory "{repository_root_directory}"'
f'git config --global --add safe.directory "{repository_root_directory.as_posix()}"'
)
# Update pre-commit config file
_run_cmd_in_subprocess(f'"{python_executable}" -m pre_commit autoupdate --freeze')
try:
_run_cmd_in_subprocess(f'"{python_executable}" -m pre_commit autoupdate --freeze')
except:
with open("/github/home/.cache/pre-commit/pre-commit.log") as f:
print(f.read())
raise

# Fix the formatting of the pre-commit config file
with warnings.catch_warnings():
Expand Down Expand Up @@ -264,7 +269,8 @@ def main() -> None:
args = _parse_arguments()

print(f"\nUpdating development dependencies in {args.repo_root}")
os.chdir(args.repo_root)
repo_root = Path(args.repo_root)
os.chdir(repo_root)

_update_poetry_dependencies(
python_executable,
Expand Down

0 comments on commit 1c66fa3

Please sign in to comment.