diff options
| author | 2024-07-30 19:18:35 +0200 | |
|---|---|---|
| committer | 2024-07-30 19:18:35 +0200 | |
| commit | b478e5e58852fd42a6723d186ee5ff005f53789f (patch) | |
| tree | f29614a34f67ce3576ae7639b171a09eb94ac3f1 /poetry_restrict_plugin/plugin.py | |
| parent | Allow access to gitconfig for pre-commit (diff) | |
Allow access for directory where pyproject.toml is
Previously, it would always use the current working directory, which was
inaccurate when running poetry in a sub-directory of the project.
Diffstat (limited to 'poetry_restrict_plugin/plugin.py')
| -rw-r--r-- | poetry_restrict_plugin/plugin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poetry_restrict_plugin/plugin.py b/poetry_restrict_plugin/plugin.py index fb4d509..632f5bf 100644 --- a/poetry_restrict_plugin/plugin.py +++ b/poetry_restrict_plugin/plugin.py @@ -93,7 +93,7 @@ class RestrictPlugin(Plugin): # Allow manipulation of files in our projects, e.g. for linters. # We might need to check this more thoroughly. For instance, configuring custom # filter programs in gitattributes might allow a sandbox escape. - ruleset.allow(".") + ruleset.allow(os.path.dirname(poetry.pyproject_path)) ruleset.apply() |