I have a post commit hook (a groovy script) in gitblit to invoke a REST endpoint. In this script I am executing a curl command. But it seems to fail. The curl command works fine
To avoid ‘running-forever’ process (this happens on some Windows env when output exceeds 4096 bytes) add initial size to ByteArrayOutputStream
def initialSize = 4096
def out = new ByteArrayOutputStream(initialSize)
def err = new ByteArrayOutputStream(initialSize)
def proc = command.execute()
proc.consumeProcessOutput(out, err)
proc.waitFor()