Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify meaning of "hook environments" #239

Closed
esciara opened this issue Jun 18, 2019 · 9 comments · Fixed by #256
Closed

Clarify meaning of "hook environments" #239

esciara opened this issue Jun 18, 2019 · 9 comments · Fixed by #256

Comments

@esciara
Copy link
Contributor

esciara commented Jun 18, 2019

In sections pre-commit install and pre-commit install-hooks are mentioned "hook environments"... Not sure what this means... Could you clarify?

Could not test what result it bring as pre-commit install --install-hooks only returns pre-commit installed at .git/hooks/pre-commit as message...

@asottile
Copy link
Member

that means they're already up to date and installed then (it's idempotent).

here's some output you might see if they weren't already installed:

$ pre-commit install --install-hooks
pre-commit installed at .git/hooks/pre-commit
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8.
[INFO] Installing environment for https://gitlab.com/pycqa/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...

@esciara
Copy link
Contributor Author

esciara commented Jun 18, 2019

Thanks... can you clarify what you mean by "environment"? Is that the language?

@esciara
Copy link
Contributor Author

esciara commented Jun 18, 2019

or virtual environment?

@asottile
Copy link
Member

asottile commented Jun 18, 2019

It depends on the language, for python it's virtualenvs, for go it's a binary built from a temporary gopath. It's kind of intentionally ambiguous in the docs so it doesn't need to enumerate the many different types of installs that can occur.

@esciara
Copy link
Contributor Author

esciara commented Jun 19, 2019

OK. Need to have a look into it and maybe quickly update the doc...

@rpdelaney
Copy link
Contributor

@asottile

It's kind of intentionally ambiguous in the docs so it doesn't need to enumerate the many different types of installs that can occur.

Is that in the interest of saving space in the top-level documentation, or not having to maintain documentation of a moving target?

@asottile
Copy link
Member

It's because it would be duplicated with the language-specific docs and prohibitively verbose and unnecessary to enumerate

@rpdelaney
Copy link
Contributor

Gotcha. Well, I understand the problem, but I'd gently suggest that directing the reader to the language specific docs would be better than intentional vagueness in this case.

@asottile
Copy link
Member

patches welcome!

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

Successfully merging a pull request may close this issue.

3 participants