[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fab-user] Trouble receiving a stdout string from run
From: |
Neil Clayton |
Subject: |
[Fab-user] Trouble receiving a stdout string from run |
Date: |
Thu, 25 Jul 2013 17:27:47 +1200 |
Hi,
I feel like I'm missing something obvious.
The docs indicate that the output of a run() command will be a combination of
stdout/err.
I'm executing a 'git status --porcelain', on a repo with some changes.
Nothing however is returned in the task.
e.g:
def _is_dirty(ignore_untracked_files=False):
untracked_files = '--untracked-files=no' if ignore_untracked_files else ''
outputFromStatus = run('git status {0} --porcelain'.format(untracked_files))
print "Got status a {1}, '{0}', stdout: {2}, stderr:
{3}".format(outputFromStatus, type(outputFromStatus), outputFromStatus.stdout,
outputFromStatus.stderr)
abort(blue('ra ra ra'))
return outputFromStatus != ''
And on the terminal I see:
Fetching at folder:/Volumes/Development/Users/neil/Sites/swb/../store/
[localhost] run: git status --porcelain
Got status a <class 'fabric.operations._AttributeString'>, '', stdout: ,
stderr:
Fatal error: ra ra ra
Aborting.
Yet if I do this manually:
(swb2)wisdom:store neil$ cd /Volumes/Development/Users/neil/Sites/swb/../store/
(swb2)wisdom:store neil$ git-status --porcelain
M .idea/workspace.xml
M DataObjects/Config.php
M pages/config.php
(swb2)wisdom:store neil$
What am I missing?
Neil Clayton
- [Fab-user] Trouble receiving a stdout string from run,
Neil Clayton <=