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
42a6b791
Unverified
Commit
42a6b791
authored
Aug 17, 2021
by
Taha Tesser
Committed by
GitHub
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tools] Add Xcode version to non-verbose Flutter doctor (#87022)
parent
a1ae4fea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+1
-0
xcode_validator.dart
packages/flutter_tools/lib/src/macos/xcode_validator.dart
+4
-2
xcode_validator_test.dart
..._tools/test/general.shard/macos/xcode_validator_test.dart
+6
-0
No files found.
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
42a6b791
...
...
@@ -58,6 +58,7 @@ class XcodeProjectInterpreter {
processManager:
processManager
,
),
_version
=
version
,
_versionText
=
version
?.
toString
(),
_usage
=
usage
;
/// Create an [XcodeProjectInterpreter] for testing.
...
...
packages/flutter_tools/lib/src/macos/xcode_validator.dart
View file @
42a6b791
...
...
@@ -32,9 +32,11 @@ class XcodeValidator extends DoctorValidator {
}
final
String
?
versionText
=
_xcode
.
versionText
;
if
(
versionText
!=
null
)
{
messages
.
add
(
ValidationMessage
(
versionText
));
xcodeVersionInfo
=
versionText
;
if
(
xcodeVersionInfo
.
contains
(
','
))
{
xcodeVersionInfo
=
xcodeVersionInfo
.
substring
(
0
,
xcodeVersionInfo
.
indexOf
(
','
));
}
}
if
(!
_xcode
.
isInstalledAndMeetsVersionCheck
)
{
xcodeStatus
=
ValidationType
.
partial
;
messages
.
add
(
ValidationMessage
.
error
(
_userMessages
.
xcodeOutdated
(
xcodeRequiredVersion
.
toString
())));
...
...
packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart
View file @
42a6b791
...
...
@@ -23,6 +23,7 @@ void main() {
final
XcodeValidator
validator
=
XcodeValidator
(
xcode:
xcode
,
userMessages:
UserMessages
());
final
ValidationResult
result
=
await
validator
.
validate
();
expect
(
result
.
type
,
ValidationType
.
missing
);
expect
(
result
.
statusInfo
,
isNull
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
error
);
expect
(
result
.
messages
.
last
.
message
,
contains
(
'Xcode not installed'
));
});
...
...
@@ -182,6 +183,11 @@ void main() {
final
XcodeValidator
validator
=
XcodeValidator
(
xcode:
xcode
,
userMessages:
UserMessages
());
final
ValidationResult
result
=
await
validator
.
validate
();
expect
(
result
.
type
,
ValidationType
.
installed
);
expect
(
result
.
messages
.
length
,
1
);
final
ValidationMessage
firstMessage
=
result
.
messages
.
first
;
expect
(
firstMessage
.
type
,
ValidationMessageType
.
information
);
expect
(
firstMessage
.
message
,
'Xcode at /Library/Developer/CommandLineTools'
);
expect
(
result
.
statusInfo
,
'1000.0.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