Skip to content

Allow setting cwd of post-write hooks #822

Description

@maresb

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...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions