make the ios development path less mandatory

This commit is contained in:
Devon Carew
2016-02-16 18:23:43 -08:00
parent c30b3cc69b
commit 7ae6f7f391
11 changed files with 367 additions and 6 deletions

View File

@@ -4,12 +4,18 @@
import '../android/android_sdk.dart';
import '../device.dart';
import '../doctor.dart';
import '../ios/mac.dart';
import 'context.dart';
import 'logger.dart';
DeviceManager get deviceManager => context[DeviceManager];
Logger get logger => context[Logger];
AndroidSdk get androidSdk => context[AndroidSdk];
Doctor get doctor => context[Doctor];
// Mac specific globals - will be null on other platforms.
XCode get xcode => context[XCode];
/// Display an error level message to the user. Commands should use this if they
/// fail in some way.

View File

@@ -80,6 +80,14 @@ String sdkBinaryName(String name) {
return Platform.isWindows ? '$name.bat' : name;
}
bool exitsHappy(List<String> cli) {
try {
return Process.runSync(cli.first, cli.sublist(1)).exitCode == 0;
} catch (error) {
return false;
}
}
String _runWithLoggingSync(List<String> cmd, {
bool checked: false,
bool noisyErrors: false,