From 6e8676b1d31846fc844684a7fe2f01ef088a1aa6 Mon Sep 17 00:00:00 2001 From: narayan Date: Tue, 12 Nov 2024 14:23:16 -0500 Subject: [PATCH] minor change --- .github/workflows/pre-commit.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index efb6b299f..20e1be228 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,17 +18,17 @@ jobs: python -m pip install --upgrade pip pip install pre-commit + # Install pre-commit hooks (this will create the necessary cache directories) + - name: Install pre-commit hooks + run: pre-commit install + # Step to fix 'python_venv' language to 'python' in .pre-commit-hooks.yaml - name: Fix 'python_venv' language to 'python' in .pre-commit-hooks.yaml run: | echo "Fixing pre-commit hook language..." - # Modify the cached pre-commit-hooks.yaml files before installation + # Now that pre-commit hooks are installed, modify the cached .pre-commit-hooks.yaml files find ~/.cache/pre-commit/ -type f -name '.pre-commit-hooks.yaml' -exec sed -i 's/python_venv/python/g' {} + - # Install pre-commit hooks after fixing language key - - name: Install pre-commit hooks - run: pre-commit install - # Run pre-commit action - name: Run pre-commit checks uses: pre-commit/action@v3.0.0