Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

subversion pre-commit hook error code 255

Tags:

linux

bash

svn

I added pre-commit hook script to the repository.

It always gives below error while committing:

svn: Commit blocked by pre-commit hook (exit code 255) with no output.

I have already checked that my pre-commit script is having executable permission and its a bash script.

#!/bin/bash 

is added in the beginning of the file.

Even if I write

exit 0  

in the beginning of the file, it is not allowing me to commit and giving the same 255 error.

Now my script looks like:

#!/bin/bash
exit 0

and I am again getting the same error while committing.

I just want to know what is error code 255 and how can I make my pre-commit script work properly?

like image 532
Tanu Gupta Avatar asked Sep 20 '26 23:09

Tanu Gupta


1 Answers

There was some format issue. The file was in DOS format. I modified the format from dos to unix and it started working. I installed tool dos2unix and ran below command:

dos2unix pre-commit
like image 125
Tanu Gupta Avatar answered Sep 23 '26 16:09

Tanu Gupta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!