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

On hooks tries to execute folders in ${hookname}.d #10954

Closed
2 of 7 tasks
bazilek opened this issue Apr 4, 2020 · 2 comments
Closed
2 of 7 tasks

On hooks tries to execute folders in ${hookname}.d #10954

bazilek opened this issue Apr 4, 2020 · 2 comments

Comments

@bazilek
Copy link
Contributor

bazilek commented Apr 4, 2020

  • Gitea version: Current master 2a06d3a
  • Git version: Not relevant
  • Operating system: Not relevant
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    remote: hooks/update: line 8: ./hooks/update.d/__pycache__: Is a directory

Description

Face the issue when managing hooks in python.

Screenshots

@bazilek bazilek changed the title On hooks tries to executed folders in ${hookname}.d On hooks tries to execute folders in ${hookname}.d Apr 4, 2020
bazilek added a commit to bazilek/gitea that referenced this issue Apr 4, 2020
@mrsdizzie
Copy link
Member

mrsdizzie commented Apr 4, 2020

We probably shouldn't try and run a directory (!) but also a script in general shouldn't be creating folders or other files inside of update.d either since the only purpose of that folder is "execute anything that is put in here as a hook"

I believe you can either run python with -B flag or set PYTHONDONTWRITEBYTECODE=1 to avoid creating that in general

@jolheiser
Copy link
Member

Closed by #10955

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants