pre-receive, update and post-receive hooks not automatically recreated with executable permissions #9091
Closed
2 of 7 tasks
Labels
type/enhancement
An improvement of existing functionality
2.22.0
[x]
):Description
When the pre-receive, update and post-receive hooks have lost their executable permission (due to reasons not directly relevant to the actual bug), they should be automatically recreated with +x permission (see
gitea/models/repo.go
Lines 1114 to 1150 in dfd8b94
However, it turns out that this is not the case, apparently because ioutil.WriteFile does not change permissions on existing files.
Proposed solution by Zeripath: just need to call os.Chmod afterwards
The text was updated successfully, but these errors were encountered: