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

what is the base directory for "log_file" output #1553

Closed
drjasonharrison opened this issue Aug 5, 2020 · 5 comments
Closed

what is the base directory for "log_file" output #1553

drjasonharrison opened this issue Aug 5, 2020 · 5 comments
Labels

Comments

@drjasonharrison
Copy link

I'm running pytest using the following definition:

-   repo: local
    hooks:
    -   id: simple-pytest
        description: run pytest
        name: simple-pytest
        entry: pytest
        language: system
        types: [python]
        pass_filenames: false
        stages: [push]
        log_file: pytest.log

and I see pre-commit list pytest during the git push after I make a change to a .py source file and git add and git commit. But I cannot find a pytest.log file anywhere.

When I run pytest manually:

pytest > manual-pytest.log

The manual-pytest.log file is created in the current working directory.

This is on Ubuntu 18.04.4, with python 3.6.9, pytest 5.4.3

@asottile
Copy link
Member

asottile commented Aug 6, 2020

can you show your version and output? it should be created in the working directory

@asottile
Copy link
Member

asottile commented Aug 6, 2020

oh, but only if it's failing -- the feature is meant as a tool for CI

@drjasonharrison
Copy link
Author

Got it. Can the documentation be expanded to include that detail?

@asottile
Copy link
Member

asottile commented Aug 6, 2020

sure -- would you like to contribute to the docs? they live at https://github.com/pre-commit/pre-commit.com (if not, that's fine too and I can do it!)

@drjasonharrison
Copy link
Author

Yes, I will create a pull request

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

No branches or pull requests

2 participants