Skip to content

Commit d2b2881

Browse files
andreyneringlunny
authored andcommitted
Fix Git hooks not being executed on Windows when running as a service (#1149)
Closes #1139
1 parent 5d40db6 commit d2b2881

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/minwinsvc/svc_windows.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ var (
1818
onExit func()
1919
guard sync.Mutex
2020
skip, _ = strconv.ParseBool(os.Getenv("SKIP_MINWINSVC"))
21+
isSSH = os.Getenv("SSH_ORIGINAL_COMMAND") != ""
2122
)
2223

2324
func init() {
24-
if skip {
25+
if skip || isSSH {
2526
return
2627
}
2728
interactive, err := svc.IsAnInteractiveSession()

0 commit comments

Comments
 (0)