Error "java.io.IOException" when doing git commit

60 Views Asked by At

Recently I need to change my computer. I installed git and i was able to use it, adding files to stage, seeing status etc. But when I try to make a commit with git commit -m "My commit here". I'm getting the follwing error:

Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "" (in directory "D:\framework"): CreateProcess error=87, Falscher Parameter
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:397)
        at jdk.nashorn.tools.Shell.apply(Shell.java:471)
        at jdk.nashorn.tools.Shell.runScripts(Shell.java:400)
        at jdk.nashorn.tools.Shell.run(Shell.java:179)
        at jdk.nashorn.tools.Shell.main(Shell.java:143)
        at jdk.nashorn.tools.Shell.main(Shell.java:119)
Caused by: java.io.IOException: Cannot run program "" (in directory "D:\framework"): CreateProcess error=87, Falscher Parameter
        at java.lang.ProcessBuilder.start(Unknown Source)
        at jdk.nashorn.internal.runtime.ScriptingFunctions.exec(ScriptingFunctions.java:185)
        at jdk.nashorn.internal.scripts.Script$Recompilation$2$1767A$hooks_pre_commit.fileExists(C:/UserData/hooks-tools/Hooks/Tools/hooks-pre-commit:50)
        at jdk.nashorn.internal.scripts.Script$Recompilation$1$1899A$hooks_pre_commit.loadHook(C:/UserData/hooks-tools/Hooks/Tools/hooks-pre-commit:54)
        at jdk.nashorn.internal.scripts.Script$hooks_pre_commit.:program(C:/UserData/hooks-tools/Hooks/Tools/hooks-pre-commit:25)
        at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
        at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
        at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
        ... 5 more
Caused by: java.io.IOException: CreateProcess error=87, Falscher Parameter
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 13 more

I already looked on stackverflow older issues and googled it, but could solve the issue. I thought maybe the problem was with this hooks, I changed the file name from hooks-pre-commit to hooks-pre-commit.disabled, but this didnt solve the problem. Any idea ?

1

There are 1 best solutions below

0
Lucas Fonseca Alexandre de Oli On

So I manage to solve the problem. I seems it was this hooks. I have no idea where the hooks were coming from, i just removed then from the folder Userdata and now is working.