Re: [Linux] Hook hashbang hardships
On 14.10.2016 14:58, Andrew Reedick wrote: >> Hello! I've been having trouble getting my own pre-revprop-change hook >> script to work. Svn was refusing any change to a revprop with the following >> error: >> >> svn: E165001: Revprop change blocked by pre-revprop-change hook (exit code >> 1) with no output. >> >> >> Until I found out that the issue was in the script's shebang: >> >> #!/bin/bash -e >> >> which wouldn't work. Had to remove ' -e'. Is this expected behaviour or is >> there something wrong with svn (version 1.9.4 (r1740329) on >> Linux/x86_64) ? > > Bash doesn't appear to have a "-e" option. (There is a "-e" test to check if > a path exists, but that's not a command line arg you pass in to bash.) > > /bin/bash --help > man bash > https://linux.die.net/man/1/bash You really need to read the manpage, which says: All of the single-character shell options documented in the description of the *set* builtin command can be used as options when the shell is invoked. -- Brane
RE: [Linux] Hook hashbang hardships
> Hello! I've been having trouble getting my own pre-revprop-change hook script > to work. Svn was refusing any change to a revprop with the following error: > > svn: E165001: Revprop change blocked by pre-revprop-change hook (exit code 1) > with no output. > > > Until I found out that the issue was in the script's shebang: > > #!/bin/bash -e > > which wouldn't work. Had to remove ' -e'. Is this expected behaviour or is > there something wrong with svn (version 1.9.4 (r1740329) on > Linux/x86_64) ? Bash doesn't appear to have a "-e" option. (There is a "-e" test to check if a path exists, but that's not a command line arg you pass in to bash.) /bin/bash --help man bash https://linux.die.net/man/1/bash
Re: Fwd: [Linux] Hook hashbang hardships
[switching back to users@] On 12.10.2016 12:04, Dario Niedermann wrote: > Il 12/10/2016 alle 11:29, Stefan ha scritto: > >> Forwarding messages to the dev list is not really considered good >> practice. > The community guide on Subversion's website says it's OK to ask on > dev@ if a report on a possible issue with svn doesn't goes unanswered > on users@. Considering that the only reply I got on users@ was from > someone who completely misread the problem, it seemed to me that the > last-ditch attempt before opening an issue was to report it is dev@. > > Returning to the original topic, and just to be even clearer: this is > about Subversion NOT RUNNING a script because it has a FLAG FOR THE > SHELL in its SHEBANG LINE. Not because I got the path to bash wrong or > because there is some other error in my script (as should be *OBVIOUS* > from my very first email). How do you know the script isn't running? On the contrary, your report implies that the script /is/ running and exits with an error code; when you modified it, it stopped exiting with an error. > I was asking if not running a script under these circumstances is > INTENDED BEHAVIOUR for svn or if it might be a BUG IN SUBVERSION. It has nothing to do with Subversion. Subversion is not responsible for interpreting the #! line at the beginning of the script; the kernel does that. -- Brane
Re: [Linux] Hook hashbang hardships
On 27.09.2016 12:59, Dario Niedermann wrote: > I found out that the issue was in the script's shebang: > > #!/bin/bash -e > > which wouldn't work. Had to remove ' -e'. Is this expected behaviour or > is there something wrong with svn (version 1.9.4 (r1740329) on > Linux/x86_64) ? Why would anything be wrong with Subversion? Apparently something is not going as expected in your own script, causing bash to exit. Scripts always have to be adapted to local needs. On some systems, the path for bash might be different, or bash might not be available at all. That's each user's own responsibility. -Ralph
[Linux] Hook hashbang hardships
Hello! I've been having trouble getting my own pre-revprop-change hook script to work. Svn was refusing any change to a revprop with the following error: svn: E165001: Revprop change blocked by pre-revprop-change hook (exit code 1) with no output. Until I found out that the issue was in the script's shebang: #!/bin/bash -e which wouldn't work. Had to remove ' -e'. Is this expected behaviour or is there something wrong with svn (version 1.9.4 (r1740329) on Linux/x86_64) ? Thanks, DN