From 08d788099bf02c41e0668b14ce0a20e095f88b3e Mon Sep 17 00:00:00 2001 From: Dan Rubel Date: Sun, 2 Oct 2016 12:23:03 -0400 Subject: [PATCH] Prevent "install XCode" dialog when flutter doctor is run (#6164) fixes https://github.com/flutter/flutter/issues/6163 --- packages/flutter_tools/lib/src/ios/mac.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index d180827dd2..ebe9dede2c 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -28,6 +28,10 @@ class XCode { try { _xcodeSelectPath = runSync(['xcode-select', '--print-path']); + if (_xcodeSelectPath == null || _xcodeSelectPath.trim().isEmpty) { + _isInstalled = false; + return; + } _isInstalled = true; _xcodeVersionText = runSync(['xcodebuild', '-version']).replaceAll('\n', ', ');