pre-commit/pre_commit/commands
Martin Trautmann dbdba3c67f Activate conda environment in pre-commit hook.
Save conda environment that was active during conda install when using
option --hooks-activate-conda. The saved environment will be activated
before calling pre-commit hooks.

Especially on Windows, more and more actions within a conda environment
require the conda environment to be activated. Thus saving just the
python executable is not enough any more.

There is currently one downside of using the option
--hooks-activate-conda. It uses "conda run" which will only show
console output after the run is completed. We have a pull request to
conda open which introduces an option to show interactive console
output in conda run. Once this is approved, it might be ok to make this
option the default behaviour.
2020-02-10 16:56:29 +01:00
..
__init__.py Move commands into their own files. 2014-06-13 19:52:14 -07:00
autoupdate.py Replace match.group(n) with match[n] 2020-01-12 13:39:53 -08:00
clean.py Add types to pre-commit 2020-01-12 10:15:01 -08:00
gc.py Add types to pre-commit 2020-01-12 10:15:01 -08:00
hook_impl.py Move most of the actual hook script into pre-commit hook-impl 2020-01-21 16:41:22 -08:00
init_templatedir.py More miscellaneous cleanup 2020-01-13 11:47:34 -08:00
install_uninstall.py Activate conda environment in pre-commit hook. 2020-02-10 16:56:29 +01:00
migrate_config.py More miscellaneous cleanup 2020-01-13 11:47:34 -08:00
run.py Move test to install_uninstall test so environment variables apply 2020-01-16 13:02:20 -08:00
sample_config.py Add types to pre-commit 2020-01-12 10:15:01 -08:00
try_repo.py More miscellaneous cleanup 2020-01-13 11:47:34 -08:00