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

hooks folder inside .git must be manually created before nbdev_install_git_hooks #230

Closed
Anacron-sec opened this issue Sep 3, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Anacron-sec
Copy link

Platform for reproduction: Paperspace gradient - P5000 Free GPU - FastAI template

I was following the tutorial at https://nbdev.fast.ai/tutorial.html to develop my own library and when i run nbdev_install_git_hooks as stated in "Install git hooks" section i run into the following error:

Traceback (most recent call last):
  File "/opt/conda/envs/fastai/bin/nbdev_install_git_hooks", line 8, in <module>
    sys.exit(nbdev_install_git_hooks())
  File "/opt/conda/envs/fastai/lib/python3.8/site-packages/fastscript/core.py", line 76, in _f
    func(**args.__dict__)
  File "/opt/conda/envs/fastai/lib/python3.8/site-packages/nbdev/cli.py", line 337, in nbdev_install_git_hooks
    with open(fn, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/notebooks/.git/hooks/post-merge'

After i created manually the .git/hooks folder the error went away and the command returned the following, as it's supposed to be:

Executing: git config --local include.path ../.gitconfig
Success: hooks are installed and repo's .gitconfig is now trusted
@jph00 jph00 added the bug Something isn't working label Sep 6, 2020
@jph00
Copy link
Contributor

jph00 commented Sep 6, 2020

That's odd - normally those are created for you. I'll add a check.

@jph00 jph00 closed this as completed Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants