diff options
-rw-r--r-- | poetry_restrict_plugin/plugin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/poetry_restrict_plugin/plugin.py b/poetry_restrict_plugin/plugin.py index 1fc749d..51c99ff 100644 --- a/poetry_restrict_plugin/plugin.py +++ b/poetry_restrict_plugin/plugin.py @@ -90,6 +90,12 @@ class RestrictPlugin(Plugin): # Allow determining mime types. Used for ruamel.yaml installation. ruleset.allow("/etc/mime.types", rules=FSAccess.READ_FILE) + # Black cache access + ruleset.allow( + *existing_paths((os.path.expanduser("~/.cache/black"),)), + rules=FSAccess.READ_FILE | FSAccess.WRITE_FILE | FSAccess.READ_DIR, + ) + pre_commit_cache = os.path.expanduser("~/.cache/pre-commit") if os.path.exists(pre_commit_cache): ruleset.allow(pre_commit_cache) |