2011-06-20 126 views
0

如何在Windows平臺上的Git鉤子上設置python的路徑?在Windows上使用python編寫的Git鉤子

我已經tryed:

#!/c/Python/27/python.exe 

,但得到的錯誤:

error: cannot spawn .git/hooks/post-commit: No such file or directory 

回答

1

使用#!/usr/bin/env python反而是可能比較容易。但是,在特定情況下,您的主要問題可能是通常是Python27,而不是Python/27