Skip to content

Commit

Permalink
Merge pull request flutter#1032 from iansf/fix_ios_logs
Browse files Browse the repository at this point in the history
Guard IOSDevice logs
  • Loading branch information
iansf committed Sep 3, 2015
2 parents 735890c + c94b99a commit 0228634
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sky/packages/sky/lib/sky_tool
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,17 @@ class IOSDevice(object):

@classmethod
def logs(cls):
try:
cmd = [
'which',
'idevicesyslog'
]
logging.info(' '.join(cmd))
subprocess.check_call(cmd)
except subprocess.CalledProcessError:
logging.error('"log" command only works with iOS devices if you have installed idevicesyslog. Run "brew install libimobiledevice" to install it with homebrew.')
return None

def do_logs():
cmd = [
'idevicesyslog',
Expand Down

0 comments on commit 0228634

Please sign in to comment.