]> source.dussan.org Git - gitea.git/commitdiff
Fix Git hooks not being executed on Windows when running as a service (#1149)
authorAndrey Nering <andrey.nering@gmail.com>
Thu, 9 Mar 2017 01:27:43 +0000 (22:27 -0300)
committerLunny Xiao <xiaolunwen@gmail.com>
Thu, 9 Mar 2017 01:27:43 +0000 (09:27 +0800)
Closes #1139

modules/minwinsvc/svc_windows.go

index c6e87e29dfd7c3ce18a3b3bd72da94b77355e529..609bf06d3a8b1b34cbe354223ac796f536050434 100644 (file)
@@ -18,10 +18,11 @@ var (
        onExit  func()
        guard   sync.Mutex
        skip, _ = strconv.ParseBool(os.Getenv("SKIP_MINWINSVC"))
+       isSSH   = os.Getenv("SSH_ORIGINAL_COMMAND") != ""
 )
 
 func init() {
-       if skip {
+       if skip || isSSH {
                return
        }
        interactive, err := svc.IsAnInteractiveSession()