From 313369f766a53210bcd349475e29af56a087f635 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Wed, 8 Mar 2017 20:35:46 -0300 Subject: [PATCH] Fix Git hooks not being executed on Windows when running as a service Closes #1139 --- modules/minwinsvc/svc_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/minwinsvc/svc_windows.go b/modules/minwinsvc/svc_windows.go index c6e87e29dfd7c..609bf06d3a8b1 100644 --- a/modules/minwinsvc/svc_windows.go +++ b/modules/minwinsvc/svc_windows.go @@ -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()