Bash command in git after update object not found

I have the following code in a git post-update hook, which cdpulls into my working directory the git where this git lives from the bare repository:

cd $HOME/www/firefly

unset GIT_DIR

git pull hub master

combine

npm rebuild

exec git update-server-info

The problem is that when combineI start, I get:

hooks/post-update: line 14: combine: command not found

It is strange that if I manually connected to the working directory and started combine, it will successfully execute this file. What am I doing wrong?

+5
source share
1 answer

The combination is not a shell command. You probably need the full path or ./combineif it is in the same directory.

The cause of the error is that your path is different when you run the script.

+7
source

All Articles