From 1800c88967f253c8d975f5411af10b75d0b449e4 Mon Sep 17 00:00:00 2001 From: Ian Fischer Date: Wed, 2 Sep 2015 17:08:32 -0700 Subject: [PATCH] Guard sky_tool logs against failures due to missing idevicesyslog --- packages/flutter/lib/sky_tool | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/flutter/lib/sky_tool b/packages/flutter/lib/sky_tool index 51101165ed8..54c7d4efb1a 100755 --- a/packages/flutter/lib/sky_tool +++ b/packages/flutter/lib/sky_tool @@ -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',