预提交安装“环境”在哪里?

pla*_*etp 8 python git pre-commit pre-commit-hook pre-commit.com

我正在尝试设置pre-commitPython 项目的存储库。运行后,pre-commit install我看到这样的输出:

[INFO] Installing environment for https://github.com/asottile/seed-isort-config.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-pylint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Run Code Online (Sandbox Code Playgroud)

这些“环境”是什么,它们安装在哪里?

Ant*_*ile 17

环境安装到缓存中

pre-commit默认情况下将其存储库存储在~/.cache/pre-commit- 这可以通过两种方式进行配置:

  • PRE_COMMIT_HOME: 如果设置,pre-commit将使用该位置。
  • XDG_CACHE_HOME:如果设置,pre-commit将使用$XDG_CACHE_HOME/pre-commit以下XDG 基本目录规范

免责声明:我是作者

  • 不确定当您从托管目录中随心所欲地删除随机内容时您期望什么:P。“预提交清理”是预期的接口 (5认同)