How can I get my git (msysgit on windows) post-commit script to invoke my python script as python rather than bash?

后端 未结 2 877
野趣味
野趣味 2021-01-06 08:19

I wrote a post commit script in python, \"c:\\myfolder\\myscript.py\". I want to invoke it from the post-commit script. This doesn\'t find it:

#!/bin/s         


        
2条回答
  •  轮回少年
    2021-01-06 08:31

    Adding the following, the path to my python interpreter, as the first line of my python script worked:

    #!C:/apps/Python25/python
    

    Are there better ways?

提交回复
热议问题