Skip to content

gitea doctor --run hooks produces warnings on windows #20636

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

Closed
eeyrjmr opened this issue Aug 2, 2022 · 1 comment · Fixed by #20637
Closed

gitea doctor --run hooks produces warnings on windows #20636

eeyrjmr opened this issue Aug 2, 2022 · 1 comment · Fixed by #20637
Labels
Milestone

Comments

@eeyrjmr
Copy link
Contributor

eeyrjmr commented Aug 2, 2022

Description

if gitea doctor --run hooks (or --all) is run on a windows system, the script check fails when testing if the script is executable. This check does not make sense on windows as it stands

D:\gitea>gitea doctor --run hooks
[1] Check if hook files are up-to-date and executable
 - [W] old hook file D:\gitea\data\gitea-repositories\iti\internaltestinterface.git\hooks\pre-receive is not executable
 - [W] new hook file D:\gitea\data\gitea-repositories\iti\internaltestinterface.git\hooks\pre-receive.d\gitea is not executable
 - [W] old hook file D:\gitea\data\gitea-repositories\iti\internaltestinterface.git\hooks\update is not executable
 - [W] new hook file D:\gitea\data\gitea-repositories\iti\internaltestinterface.git\hooks\update.d\gitea is not executable
 - [W] old hook file D:\gitea\data\gitea-repositories\iti\internaltestinterface.git\hooks\post-receive is not executable
 - [W] new hook file D:\gitea\data\gitea-repositories\iti\internaltestinterface.git\hooks\post-receive.d\gitea is not executable
 - [W] old hook file D:\gitea\data\gitea-repositories\infra\eng_wiki.git\hooks\pre-receive is not executable

Gitea Version

1.17

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

windows

How are you running Gitea?

service

Database

MySQL

@lunny lunny added this to the 1.17.1 milestone Aug 4, 2022
lunny added a commit that referenced this issue Aug 4, 2022
* Executable check always returns true for windows 

Windows doesn't have the concept of "executable" POSIX bits so for now always return true to minimise doctor and logging noise. Addresses #20636

* gofmt tweak

* Update modules/repository/hooks.go

Co-authored-by: silverwind <[email protected]>

* gofmt comment line

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 10, 2022
* Executable check always returns true for windows 

Windows doesn't have the concept of "executable" POSIX bits so for now always return true to minimise doctor and logging noise. Addresses go-gitea#20636

* gofmt tweak

* Update modules/repository/hooks.go

Co-authored-by: silverwind <[email protected]>

* gofmt comment line

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
@wxiaoguang
Copy link
Contributor

Wait for backport

@wxiaoguang wxiaoguang reopened this Aug 11, 2022
@zeripath zeripath modified the milestones: 1.17.1, 1.17.2 Aug 17, 2022
zeripath pushed a commit to zeripath/gitea that referenced this issue Aug 17, 2022
Backport go-gitea#20637

Windows doesn't have the concept of "executable" POSIX bits so for now always return true to minimise doctor and logging noise. Addresses go-gitea#20636

Co-authored-by: silverwind <[email protected]>
zeripath added a commit that referenced this issue Aug 17, 2022
Backport #20637

Windows doesn't have the concept of "executable" POSIX bits so for now always return true to minimise doctor and logging noise. Addresses #20636

Co-authored-by: silverwind <[email protected]>

Co-authored-by: JonRB <[email protected]>
Co-authored-by: silverwind <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants