python - Fabric show print after executing commands -
i have post-receive hook on git bare repo excute fabfile.py:
def deploy(): print(cyan('pulling changes local server')) cd('/var/www') local('git pull')
it executes fine, shows output local command before print, this:
remote: /media/projetos/repositorios/test remote: b057a4b..02d85b3 master -> origin/master remote: updating b057a4b..02d85b3 remote: fast-forward remote: .../test/template/catalog/product/list.phtml | 98 +++++++++++----------- remote: 1 file changed, 47 insertions(+), 51 deletions(-) remote: pulling changes local server
if ssh on server , run fab deploy works normal.
add sys.stdout.flush()
call after print
ing, if output buffered (as on pipe, case when running under git hook), sent output stream @ point, before running command.
Comments
Post a Comment