summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2017-03-08 22:27:43 -0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-03-09 09:27:43 +0800
commitd2b288130651beb9bed486a0c6bca658de0d23e6 (patch)
treeaab95e368b00dec4f216484995524ef2e2dfc91d /modules
parent5d40db629cb3a9ffdb7cdaa759f80c253c5ea428 (diff)
downloadgitea-d2b288130651beb9bed486a0c6bca658de0d23e6.tar.gz
gitea-d2b288130651beb9bed486a0c6bca658de0d23e6.zip
Fix Git hooks not being executed on Windows when running as a service (#1149)
Closes #1139
Diffstat (limited to 'modules')
-rw-r--r--modules/minwinsvc/svc_windows.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/minwinsvc/svc_windows.go b/modules/minwinsvc/svc_windows.go
index c6e87e29df..609bf06d3a 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()