| Issue 1406: | Hooks are unusable under Windows | |
| 4 people starred this issue and may be notified of changes. | Back to list |
Gerrit tries to run hooks as system executable. While this works under linux, Windows doesn't allow running bat files (or shell scripts) without extension. error_log: [2012-05-23 13:18:21,223] ERROR com.google.gerrit.common.ChangeHookRunner : Error running hook C:\Projects\gerrit\hooks\change-restored java.io.IOException: Cannot run program "C:\Projects\gerrit\hooks\change-restored" (in directory "C:\Projects\gerrit\git\Project.git"): CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessBuilder.start(Unknown Source) at com.google.gerrit.common.ChangeHookRunner$HookTask.run(ChangeHookRunner.java:499) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:333) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 11 more
Jun 4, 2012
Project Member
#1
choro...@wikimedia.org
Jun 4, 2012
It can. I use a batch file and it works.
Sep 20, 2012
Like Tortoise, it should probably look for *.exe, *.bat, *.cmd.
Oct 27, 2014
[hooks] changeRestored = change-restored.bat |
|
| ► Sign in to add a comment |