Commit 7b9cefb3 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Add brew update step before install/upgrade (#8703)

This avoids unintentionally installing an older version if the
developer's homebrew installation is out-of-date.
parent 1bb0d772
...@@ -21,8 +21,9 @@ import '../protocol_discovery.dart'; ...@@ -21,8 +21,9 @@ import '../protocol_discovery.dart';
import 'mac.dart'; import 'mac.dart';
const String _kIdeviceinstallerInstructions = const String _kIdeviceinstallerInstructions =
'To work with iOS devices, please install ideviceinstaller.\n' 'To work with iOS devices, please install ideviceinstaller. To install, run:\n'
'To install, run \'brew install ideviceinstaller\'.'; 'brew update\n'
'brew install ideviceinstaller.';
const Duration kPortForwardTimeout = const Duration(seconds: 10); const Duration kPortForwardTimeout = const Duration(seconds: 10);
...@@ -48,6 +49,7 @@ class IOSDevice extends Device { ...@@ -48,6 +49,7 @@ class IOSDevice extends Device {
_pusherPath = _checkForCommand( _pusherPath = _checkForCommand(
'ios-deploy', 'ios-deploy',
'To copy files to iOS devices, please install ios-deploy. To install, run:\n' 'To copy files to iOS devices, please install ios-deploy. To install, run:\n'
'brew update\n'
'brew install ios-deploy'); 'brew install ios-deploy');
} }
......
...@@ -120,6 +120,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow { ...@@ -120,6 +120,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow {
messages.add(new ValidationMessage.error( messages.add(new ValidationMessage.error(
'ideviceinstaller not available; this is used to discover connected iOS devices.\n' 'ideviceinstaller not available; this is used to discover connected iOS devices.\n'
'To install, run:\n' 'To install, run:\n'
'brew update\n'
'brew install --HEAD libimobiledevice\n' 'brew install --HEAD libimobiledevice\n'
'brew install ideviceinstaller' 'brew install ideviceinstaller'
)); ));
...@@ -133,12 +134,15 @@ class IOSWorkflow extends DoctorValidator implements Workflow { ...@@ -133,12 +134,15 @@ class IOSWorkflow extends DoctorValidator implements Workflow {
brewStatus = ValidationType.partial; brewStatus = ValidationType.partial;
if (hasIosDeploy) { if (hasIosDeploy) {
messages.add(new ValidationMessage.error( messages.add(new ValidationMessage.error(
'ios-deploy out of date ($iosDeployMinimumVersion is required): ' 'ios-deploy out of date ($iosDeployMinimumVersion is required). To upgrade:\n'
'upgrade via \'brew upgrade ios-deploy\'.' 'brew update\n'
'brew upgrade ios-deploy'
)); ));
} else { } else {
messages.add(new ValidationMessage.error( messages.add(new ValidationMessage.error(
'ios-deploy not installed: install via \'brew install ios-deploy\'.' 'ios-deploy not installed. To install:\n'
'brew update\n'
'brew install ios-deploy'
)); ));
} }
} else { } else {
...@@ -149,6 +153,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow { ...@@ -149,6 +153,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow {
brewStatus = ValidationType.partial; brewStatus = ValidationType.partial;
messages.add(new ValidationMessage.error( messages.add(new ValidationMessage.error(
'libimobiledevice is incompatible with the installed Xcode version. To update, run:\n' 'libimobiledevice is incompatible with the installed Xcode version. To update, run:\n'
'brew update\n'
'brew uninstall --ignore-dependencies libimobiledevice\n' 'brew uninstall --ignore-dependencies libimobiledevice\n'
'brew install --HEAD libimobiledevice' 'brew install --HEAD libimobiledevice'
)); ));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment