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
f8e70a84
Unverified
Commit
f8e70a84
authored
Jan 06, 2022
by
crisboarna
Committed by
GitHub
Jan 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(flutter_tools): Added doctor path printing on verbose (#95453)
parent
9ad90252
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
user_messages.dart
packages/flutter_tools/lib/src/base/user_messages.dart
+1
-0
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+1
-0
flutter_validator_test.dart
...tter_tools/test/general.shard/flutter_validator_test.dart
+25
-0
No files found.
packages/flutter_tools/lib/src/base/user_messages.dart
View file @
f8e70a84
...
...
@@ -25,6 +25,7 @@ class UserMessages {
String
engineRevision
(
String
revision
)
=>
'Engine revision
$revision
'
;
String
dartRevision
(
String
revision
)
=>
'Dart version
$revision
'
;
String
devToolsVersion
(
String
version
)
=>
'DevTools version
$version
'
;
String
userPath
(
String
?
path
)
=>
'PATH =
$path
'
;
String
pubMirrorURL
(
String
url
)
=>
'Pub download mirror
$url
'
;
String
flutterMirrorURL
(
String
url
)
=>
'Flutter download mirror
$url
'
;
String
get
flutterBinariesDoNotRun
=>
...
...
packages/flutter_tools/lib/src/doctor.dart
View file @
f8e70a84
...
...
@@ -458,6 +458,7 @@ class FlutterValidator extends DoctorValidator {
messages
.
add
(
ValidationMessage
(
_userMessages
.
engineRevision
(
version
.
engineRevisionShort
)));
messages
.
add
(
ValidationMessage
(
_userMessages
.
dartRevision
(
version
.
dartSdkVersion
)));
messages
.
add
(
ValidationMessage
(
_userMessages
.
devToolsVersion
(
_devToolsVersion
())));
messages
.
add
(
ValidationMessage
(
_userMessages
.
userPath
(
_platform
.
environment
[
'PATH'
])));
final
String
?
pubUrl
=
_platform
.
environment
[
'PUB_HOSTED_URL'
];
if
(
pubUrl
!=
null
)
{
messages
.
add
(
ValidationMessage
(
_userMessages
.
pubMirrorURL
(
pubUrl
)));
...
...
packages/flutter_tools/test/general.shard/flutter_validator_test.dart
View file @
f8e70a84
...
...
@@ -188,6 +188,31 @@ void main() {
));
});
testWithoutContext
(
'FlutterValidator shows PATH environment variable when set'
,
()
async
{
final
FlutterValidator
flutterValidator
=
FlutterValidator
(
platform:
FakePlatform
(
localeName:
'en_US.UTF-8'
,
environment:
<
String
,
String
>
{
'PATH'
:
'/usr/bin:/usr/local/bin:/home/user/.bin'
,
},
),
flutterVersion:
()
=>
FakeFlutterVersion
(
frameworkVersion:
'1.0.0'
),
devToolsVersion:
()
=>
'2.8.0'
,
userMessages:
UserMessages
(),
artifacts:
Artifacts
.
test
(),
fileSystem:
MemoryFileSystem
.
test
(),
processManager:
FakeProcessManager
.
any
(),
operatingSystemUtils:
FakeOperatingSystemUtils
(
name:
'Linux'
),
flutterRoot:
()
=>
'sdk/flutter'
,
);
expect
(
await
flutterValidator
.
validate
(),
_matchDoctorValidation
(
validationType:
ValidationType
.
installed
,
statusInfo:
'Channel unknown, 1.0.0, on Linux, locale en_US.UTF-8'
,
messages:
contains
(
const
ValidationMessage
(
'PATH = /usr/bin:/usr/local/bin:/home/user/.bin'
)),
));
});
group
(
'FlutterValidator shows flutter upstream remote'
,
()
{
testWithoutContext
(
'default url'
,
()
async
{
final
FlutterValidator
flutterValidator
=
FlutterValidator
(
...
...
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