Search code examples
gitgroovygithookssmartgit

Calling Groovy script as a pre-commit hook on my subrepository using smartgit broken


Calling a pre-commit groovy script independently elsewhere (not when located in my sub-repo) worked (using windows command line). I am using Windows 7.

But, calling a groovy script when it is located within a sub-repository fails with following error

Caught: java.net.MalformedURLException: unknown protocol: c


Solution

  • On further researching I found this https://issues.apache.org/jira/browse/GROOVY-7022

    invoking scripts using fullpath was broken

    I was using Groovy 2.4.3, updating it to Groovy 2.4.4 fixed my issue :)