Repository: flutter
Issue: "flutter doctor" immediately after installing Xcode has all manner of spurious output
Labels: tool,t: flutter doctor,P3,team-tool,triaged-tool

I installed flutter (via git), then Xcode (from the app store), then ran `flutter doctor`:

```
ianh@coupari ~ % flutter doctor
You have not agreed to the Xcode license agreements. Please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode and Apple SDKs license.
Building flutter tool...
Resolving dependencies... (1.2s)
Got dependencies.
Failed to find the latest git commit date: VersionCheckError: Command exited with code 69: git -c log.showSignature=false log HEAD -n 1 --pretty=format:%ad --date=iso
Standard out: 
Standard error: You have not agreed to the Xcode license agreements. Please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode and Apple SDKs license.

Returning 1969-12-31 16:00:00.000 instead.
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel [user-branch], 0.0.0-unknown, on macOS 14.1 23B74 darwin-arm64, locale en-US)
    ! Flutter version 0.0.0-unknown on channel [user-branch] at /Users/ianh/dev/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
      Cannot resolve current version, possibly due to local changes.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[!] Xcode - develop for iOS and macOS (Xcode 15.2)
    ✗ Xcode end user license agreement not signed; open Xcode or run the command 'sudo xcodebuild -license'.
    ✗ Xcode requires additional components to be installed in order to run.
      Launch Xcode and install additional required components when prompted or run:
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
Error executing simctl: 69
You have not agreed to the Xcode license agreements. Please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to
the Xcode and Apple SDKs license.


[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 4 categories.
ianh@coupari ~ % 
```