mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-25 17:30:36 +00:00
Fix Git hooks not being executed on Windows when running as a service (#1149)
Closes #1139
This commit is contained in:
parent
5d40db629c
commit
d2b2881306
1 changed files with 2 additions and 1 deletions
|
@ -18,10 +18,11 @@ var (
|
||||||
onExit func()
|
onExit func()
|
||||||
guard sync.Mutex
|
guard sync.Mutex
|
||||||
skip, _ = strconv.ParseBool(os.Getenv("SKIP_MINWINSVC"))
|
skip, _ = strconv.ParseBool(os.Getenv("SKIP_MINWINSVC"))
|
||||||
|
isSSH = os.Getenv("SSH_ORIGINAL_COMMAND") != ""
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if skip {
|
if skip || isSSH {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
interactive, err := svc.IsAnInteractiveSession()
|
interactive, err := svc.IsAnInteractiveSession()
|
||||||
|
|
Loading…
Reference in a new issue