Replies: 1 comment
-
Hey! Yes, there is a I haven't tested |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Conda/Mamba, the package/dependency/environment manager for Python, creates Python environments. This allows for switching python versions, paths, and packages via
conda activate my-env
. This is typically done in every shell as the first command. Conda does this via path manipulation hooks, e.g. in Powershell this is(& "C:\Users\user\condapath\conda.exe" "shell.powershell" "hook") | Out-String | ?{$_} | Invoke-Expression
Once you have activated your environment, the resulting path additions in Windows looks like
binaries can be installed via
conda
,mamba
, orpip
, which will be included in the PATH of your shell post-activation. But when executing lefthook as a pre-commit hook, it will no longer be in your PATH, nor can I figure out how to activate conda successfully in order to get this PATH injection for lefthook to find binaries I would like to run.Is there any example of getting conda/mamba paths injected into lefthook before running pre-commit hooks?
Beta Was this translation helpful? Give feedback.
All reactions