meta=none
will cause post-hooks to run in working directory
#696
Labels
🐞bug
Something isn't working
Describe the bug
When using
openapi-python-client generate --meta=none
, post-hooks are run in the current directory.This is an issue if you run the command in e.g. your home directory, as hooks will then run recursively and operate on everything they can find.
The culprits appear to be here:
openapi-python-client/openapi_python_client/__init__.py
Line 87 in 47e576c
here:
openapi-python-client/openapi_python_client/__init__.py
Line 157 in 47e576c
and here:
openapi-python-client/openapi_python_client/config.py
Line 31 in 47e576c
To Reproduce
Steps to reproduce the behavior:
openapi-python-client generate --meta=none [--path=...|--url=...]
Expected behavior
I'd expect post-hooks to only ever be run in the directory generated for the client.
OpenAPI Spec File
Doesn't seem like this is required but I'll include it if you want.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: