Collabnet post-commit hook fails to execute Perl script

342 Views Asked by At

I'm trying to set up the Slack Subversion integration. I use Collabnet Edge under Windows. The Slack site suggests a Perl script (Here) to call. I've installed Dwimperl, and written a batch file to run the script, passing the parameters to the perl script. This all works correctly if I call it manually from the commandline, however when it's called by Subversion something clearly goes amiss as I don't see anything in my Slack channels.

The batch file has one line:

C:\Dwimperl\perl\bin\perl.exe C:\csvn\data\repositories\repo\hooks\slacknotify.pl %1 %2

I've verified that the hook is being called after a commit by echoing %1 and %2 to a file, and that behaves as I expect.

My guess is that Subversion calls the batch file without some environment vars set, or something along those lines, but I'm completely unfamiliar with Perl and I don't know which. I'm calling the perl executable by absolute path, so even if %PATH% is blank I think it should work.

A related question is: how do I go about debugging issues like this? The Collabnet log files have nothing in them than I can see

1

There are 1 best solutions below

0
On

In this case it was simply the PATH variable that needed setting. Specifically

SET PATH=C:\Dwimperl\perl\bin;C:\Dwimperl\perl\site\bin;C:\Dwimperl\c\bin 

at the start of the batch file has solved the problem.