Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ENV_PATH on Black action completion. #3759

Merged
merged 5 commits into from Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -50,6 +50,8 @@
[official pre-commit mirror](https://github.com/psf/black-pre-commit-mirror). Swapping
`https://github.com/psf/black` to `https://github.com/psf/black-pre-commit-mirror` in
your `.pre-commit-config.yaml` will make Black about 2x faster (#3828)
- The `.black.env` folder specified by `ENV_PATH` will now be removed on the completion
of the GitHub Action. (#3759)

### Documentation

Expand Down
2 changes: 2 additions & 0 deletions action/main.py
@@ -1,5 +1,6 @@
import os
import shlex
import shutil
import sys
from pathlib import Path
from subprocess import PIPE, STDOUT, run
Expand Down Expand Up @@ -73,5 +74,6 @@
stderr=STDOUT,
encoding="utf-8",
)
shutil.rmtree(ENV_PATH, ignore_errors=True)
print(proc.stdout)
sys.exit(proc.returncode)