Skip to content

Commit

Permalink
Add exception for docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
adiroiban committed Nov 3, 2024
1 parent 75b92d2 commit 23a2ee9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "chevah-compat"
version = "1.2.1"
version = "1.2.2"
maintainers = [
{ name = "Adi Roiban", email = "adi.roiban@proatria.com" },
]
Expand Down
8 changes: 8 additions & 0 deletions release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ Release notes for chevah.compat
===============================


1.2.2 - 2024-11-03
------------------

* Allow cleaning testing filesystem inside the `RUNNER_WORKSPACE` environment
variable path.
This is for GitHub Action tests executed inside a container.


1.2.1 - 2024-11-03
------------------

Expand Down
6 changes: 5 additions & 1 deletion src/chevah_compat/testing/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,12 @@ def have_safe_path(path):
if path == '/':
return False

# Allow cleaning temporary directories.
if tempfile.tempdir and path.startswith(tempfile.tempdir):
# Allow cleaning default Python temporary directories.
return True

if path.startswith(os.environ.get('RUNNER_WORKSPACE', '/tmp/')):
# Allow cleaning GitHub Actions work directories.
return True

if os.name == 'posix':
Expand Down

0 comments on commit 23a2ee9

Please sign in to comment.