summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2024-07-30 19:46:57 +0200
committerGravatar Johannes Christ <[email protected]>2024-07-30 19:46:57 +0200
commit1adb5ab890792bddc6856b8e1a16779a9e7a8313 (patch)
treeeab68a49dfde4944c564f0acc874f34161d0832d
parentFix path to HOME gitconfig (diff)
Allow access to /etc/mime.types
-rw-r--r--poetry_restrict_plugin/plugin.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/poetry_restrict_plugin/plugin.py b/poetry_restrict_plugin/plugin.py
index 008dccf..2aab1c9 100644
--- a/poetry_restrict_plugin/plugin.py
+++ b/poetry_restrict_plugin/plugin.py
@@ -82,6 +82,9 @@ class RestrictPlugin(Plugin):
)
ruleset.allow("/etc/ssl/certs", "/usr/local/share/ca-certificates", rules=FSAccess.READ_FILE | FSAccess.READ_DIR)
+ # Allow determining mime types. Used for ruamel.yaml installation.
+ ruleset.allow("/etc/mime.types", rules=FSAccess.READ_FILE)
+
pre_commit_cache = os.path.expanduser("~/.cache/pre-commit")
if os.path.exists(pre_commit_cache):
ruleset.allow(pre_commit_cache)