Having trouble with post-commit hook
I am following this tutorial that is like the hello world for post-commit
I am using Ubuntu 10.04. I installed svnnotify
and ran $ which svnnotify
which output:
/usr/bin/svnnotify
so I changed the path in the turorial from /usr/local/bin/svnnotify
to /usr/bin/svnnotify
I also tried changing the line: #!/bin/sh
to #!/bin/bash
since bash is the login shell in ubuntu 10.04.
I tried to run it the way the tutorial originally had it, with my changes, and combinations of the two.
Every time the commit is successful but I get
Warning: post-commit hook failed (exit code 1) with no output.
The original way had output not found
I am very new to linux and shell scripting and have exhausted everything I can think of. What am I doing wro开发者_C百科ng?
Get the script working and tested before trying to run as a commit hook. I expect that your problem is something to do with the script, maybe not being marked as executable, environment wrong, etc.. i.e. if you can't get it to run successfully from the command line, this is more of a unix/shell question and doesn't really have anything to do with SVN (yet).
I'm not sure whether this applies in the Linux world, but in the Windows versions of SVN I've used, the code which runs the hook scripts only captures STDERR. If your hook script is only writing messages to STDOUT, that would likely explain the "No Output" warning.
精彩评论