Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting cwd of post-write hooks #822

Closed
maresb opened this issue Mar 29, 2021 · 1 comment
Closed

Allow setting cwd of post-write hooks #822

maresb opened this issue Mar 29, 2021 · 1 comment

Comments

@maresb
Copy link
Contributor

maresb commented Mar 29, 2021

Is your feature request related to a problem? Please describe.

I am running pre-commit as a post-write hook. However, when using command.revision(), the working directory may be outside of my repository, in which case my .pre-commit-config.yaml is not found.

Describe the solution you'd like

In my alembic.ini I want to add the following line under the [post_write_hooks] section

pre-commit.cwd = %(here)s

in order to have a reproducible cwd.

PR incoming...

@maresb maresb added the requires triage New issue that requires categorization label Mar 29, 2021
maresb added a commit to maresb/alembic that referenced this issue Mar 29, 2021
@sqla-tester
Copy link
Collaborator

Ben Mares has proposed a fix for this issue in the master branch:

Add cwd post-write hook option https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/2685

@CaselIT CaselIT removed the requires triage New issue that requires categorization label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants