Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1826fb95
Commit
1826fb95
authored
Mar 28, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2964 from devoncarew/fix_doctor_exception
fix an exception from flutter doctor
parents
2ee15bfd
4ac18681
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
executable.dart
packages/flutter_tools/lib/executable.dart
+2
-2
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+20
-13
No files found.
packages/flutter_tools/lib/executable.dart
View file @
1826fb95
...
...
@@ -140,7 +140,7 @@ String _doctorText() {
appContext
.
runInZone
(()
=>
doctor
.
diagnose
());
return
logger
.
statusText
;
}
catch
(
error
)
{
return
''
;
}
catch
(
error
,
trace
)
{
return
'
encountered exception:
$error
\n
$trace
'
;
}
}
packages/flutter_tools/lib/src/ios/mac.dart
View file @
1826fb95
...
...
@@ -31,17 +31,21 @@ class XCode {
_xcodeVersionText
=
runSync
(<
String
>[
'xcodebuild'
,
'-version'
]).
replaceAll
(
'
\n
'
,
', '
);
try
{
printTrace
(
'xcrun clang'
);
ProcessResult
result
=
Process
.
runSync
(
'/usr/bin/xcrun'
,
<
String
>[
'clang'
]);
if
(
result
.
stdout
!=
null
&&
result
.
stdout
.
contains
(
'license'
))
_eulaSigned
=
false
;
else
if
(
result
.
stderr
!=
null
&&
result
.
stderr
.
contains
(
'license'
))
_eulaSigned
=
false
;
else
_eulaSigned
=
true
;
}
catch
(
error
)
{
if
(!
xcodeVersionRegex
.
hasMatch
(
_xcodeVersionText
))
{
_isInstalled
=
false
;
}
else
{
try
{
printTrace
(
'xcrun clang'
);
ProcessResult
result
=
Process
.
runSync
(
'/usr/bin/xcrun'
,
<
String
>[
'clang'
]);
if
(
result
.
stdout
!=
null
&&
result
.
stdout
.
contains
(
'license'
))
_eulaSigned
=
false
;
else
if
(
result
.
stderr
!=
null
&&
result
.
stderr
.
contains
(
'license'
))
_eulaSigned
=
false
;
else
_eulaSigned
=
true
;
}
catch
(
error
)
{
}
}
}
catch
(
error
)
{
_isInstalled
=
false
;
...
...
@@ -66,10 +70,13 @@ class XCode {
String
_xcodeVersionText
;
String
get
xcodeVersionText
=>
_xcodeVersionText
;
final
RegExp
xcodeVersionRegex
=
new
RegExp
(
r'Xcode ([0-9.]+)'
);
bool
get
xcodeVersionSatisfactory
{
RegExp
regex
=
new
RegExp
(
r'Xcode ([0-9.]+)'
);
if
(!
xcodeVersionRegex
.
hasMatch
(
xcodeVersionText
))
return
false
;
String
version
=
r
egex
.
firstMatch
(
xcodeVersionText
).
group
(
1
);
String
version
=
xcodeVersionR
egex
.
firstMatch
(
xcodeVersionText
).
group
(
1
);
List
<
String
>
components
=
version
.
split
(
'.'
);
int
major
=
int
.
parse
(
components
[
0
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment