我正试图设置一个fabfile来部署我的Django应用程序。
我不明白为什么我会犯这个错误:
Fatal error: local() encountered an error (return code 2) while executing 'git commit -m 'changed settings for prodserver'
$ fab create_branch_deploy_to_prodserver
[localhost] run: git checkout prodserver_server
[localhost] run: git merge master
[localhost] run: cp settings_prodserver.py settings.py
[localhost] run: git add settings.py
[localhost] run: git commit -m 'changed settings for prodserver'
Fatal error: local() encountered an error (return code 1) while executing 'git commit -m 'changed settings for prodserver''
Aborting.
如果面料的功能:
def create_branch_deploy_to_prodserver():
local("git checkout prodserver_server")
local("git merge master")
local('cp settings_prodserver.py settings.py') #
#local('git rm fabfile.py') #This is also creating error so it's commented out
local('git add settings.py')
local("git commit -m 'changed settings for prodserver'")
可以从Fabric提交git吗?
这是一个与python相关的问题吗,就像this thread中描述的那样?
fabfile_runner.py
当我在声明中添加capture=False时,我能够诊断该问题:
这样可以更详细地显示错误。
显然,Fabric的维护者将在1.0中将
local
的行为还原为默认情况下不捕获。相关问题 更多 >
编程相关推荐