Repository: flutter
Issue: Crash while trying to run "flutter packages get", give better error message when iOS project is missing
Labels: c: crash,tool,P2,team-tool,triaged-tool

I was trying to rearrange the repo, and I moved some things around and probably have some invalid paths in my `pubspec.yaml`.  In any case, it shouldn't crash, it should give a reasonable error message or recover.

It says the `assets-for-api-docs/packages/diagram_capture/ios/Runner.xcodeproj` directory is missing (indeed, it doesn't exist on the disk).

## command

flutter packages get

## exception
```
ProcessException: ProcessException: No such file or directory
  Command: /usr/bin/xcodebuild -project /Users/gspencer/code/assets-for-api-docs/packages/diagram_capture/ios/Runner.xcodeproj -target Runner -showBuildSettings
```

```
#0      _ProcessImpl._runAndWait (dart:io/runtime/binprocess_patch.dart:485:7)
#1      _runNonInteractiveProcessSync (dart:io/runtime/binprocess_patch.dart:631:18)
#2      Process.runSync (dart:io/runtime/binprocess_patch.dart:66:12)
#3      LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:83:20)
#4      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:321:48)
#5      runCheckedSync (package:flutter_tools/src/base/process.dart:280:10)
#6      XcodeProjectInterpreter.getBuildSettings (package:flutter_tools/src/ios/xcodeproj.dart:180:24)
#7      CocoaPods.setupPodfile (package:flutter_tools/src/ios/cocoapods.dart:164:52)
#8      injectPlugins (package:flutter_tools/src/plugins.dart:292:17)
<asynchronous suspension>
#9      FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:143:11)
<asynchronous suspension>
#10     PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:84:23)
<asynchronous suspension>
#11     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:347:18)
#12     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#13     _rootRunUnary (dart:async/zone.dart:1134:38)
#14     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#15     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#16     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:638:45)
#17     Future._propagateToListeners (dart:async/future_impl.dart:667:32)
#18     Future._complete (dart:async/future_impl.dart:472:7)
#19     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#20     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#21     _rootRun (dart:async/zone.dart:1126:13)
#22     _CustomZone.run (dart:async/zone.dart:1023:19)
#23     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#26     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:113:13)
#27     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:166:5)
```

## flutter doctor

```
[✓] Flutter (Channel unknown, v0.5.8-pre.147, on Mac OS X 10.13.6 17G65, locale en-US)
    • Flutter version 0.5.8-pre.147 at /Users/gspencer/code/flutter
    • Framework revision 9c159638bc (3 hours ago), 2018-07-26 16:44:27 -0700
    • Engine revision 7d17da76db
    • Dart version 2.0.0-dev.69.0.flutter-937ee2e8ca

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at /Users/gspencer/Library/Android/sdk
    • Android NDK at /Users/gspencer/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.1
    • ANDROID_HOME = /Users/gspencer/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    • Dart plugin version 162.2924
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.1.6)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 26.0.2
    • Dart plugin version 181.4892.1

[✓] Connected devices (1 available)
    • Pixel 2 • FA81A1A02109 • android-arm64 • Android 8.1.0 (API 27)

• No issues found!
```