Skip to content

Commit faa163c

Browse files
committed
🔧 CI: Prune Hatch environments after install
We explicitly run `hatch env prune` right after installing Hatch to ensure that any stale or corrupted metadata for reserved environments (e.g. `hatch-static-analysis`) is removed. This avoids `JSONDecodeError` crashes observed in CI when running `hatch fmt` via pre-commit.
1 parent b381ff6 commit faa163c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎template/.github/workflows/.ci.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ jobs:
1414
python-version: '3.13'
1515

1616
- name: Install Hatch
17-
run: pip install click==8.2.1 hatch
17+
run: |
18+
pip install click==8.2.1 hatch
19+
hatch env prune
1820
1921
- name: Run pre-commit
2022
run: hatch run precommit:run

0 commit comments

Comments
 (0)