6

我有一个作为用户“git”运行的接收后挂钩。我有一个 git 可读的 virtualenv /python/ve//bin/activate。跑步:

source /python/ve/<name>/bin/activate

适用于 git 组中的用户。

当它在推送后作为接收后挂钩运行时,我收到错误“源:未找到”。

我不知道还能去哪里看 - 任何提示都非常感谢。

4

1 回答 1

13

This is something of a guess, since you haven't quoted your complete post-receive hook, but I suspect that you don't have a shebang line pointing to /bin/bash at the top. Your post-receive hook should begin:

#!/bin/bash

I suspect this because if I run a strict Bourne shell, like dash, I get the same error when trying to source anything with source.

于 2011-04-29T08:32:44.353 回答