Feature Request: Git hooks in python env
We run git hooks when committing things or pushing but many repos have directory specific env setup that is required for hooks to run properly like a virtual python environment or non global node/rust version.
While executing these hooks gitbutler can activate those envs and run hooks without failing otherwise at the moment we have to run gitbutler from command line after activating the environment for it to run git hooks in the environment.
Thanks a lot for reporting!
This is a difficult one as the environments that GUI apps launch in when launching outside of a terminal is completely different from what's in the terminal - that makes sense as well.
We go through some length to get the environment that users are typically seeing in their terminal into GUI sessions though.
https://github.com/gitbutlerapp/gitbutler/blob/8aef08f7546ad5080b7357657010786243b9be56/crates/gitbutler-tauri/src/main.rs#L417-L430 .
With that said, per-CWD environments will not picked up by this, and maybe we can do more to make this work. If so, then environments are per project though, and we'd have to change the way this works completely (the backend serves all projects, not just one).