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
1878c624
Commit
1878c624
authored
Mar 24, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2864 from devoncarew/doctor_os
print the os from flutter doctor
parents
d7e4f78b
d4185802
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+14
-3
flutter_command_runner.dart
.../flutter_tools/lib/src/runner/flutter_command_runner.dart
+3
-5
No files found.
packages/flutter_tools/lib/src/doctor.dart
View file @
1878c624
...
@@ -14,6 +14,18 @@ import 'globals.dart';
...
@@ -14,6 +14,18 @@ import 'globals.dart';
import
'ios/ios_workflow.dart'
;
import
'ios/ios_workflow.dart'
;
import
'runner/version.dart'
;
import
'runner/version.dart'
;
const
Map
<
String
,
String
>
_osNames
=
const
<
String
,
String
>{
'macos'
:
'Mac OS'
,
'linux'
:
'Linux'
,
'windows'
:
'Windows'
};
String
osName
(
)
{
String
os
=
Platform
.
operatingSystem
;
return
_osNames
.
containsKey
(
os
)
?
_osNames
[
os
]
:
os
;
}
class
Doctor
{
class
Doctor
{
Doctor
()
{
Doctor
()
{
_validators
.
add
(
new
_FlutterValidator
());
_validators
.
add
(
new
_FlutterValidator
());
...
@@ -179,11 +191,10 @@ class _FlutterValidator extends DoctorValidator {
...
@@ -179,11 +191,10 @@ class _FlutterValidator extends DoctorValidator {
messages
.
add
(
new
ValidationMessage
(
'Flutter root at
${version.flutterRoot}
'
));
messages
.
add
(
new
ValidationMessage
(
'Flutter root at
${version.flutterRoot}
'
));
messages
.
add
(
new
ValidationMessage
(
'Framework revision
${version.frameworkRevisionShort}
'
messages
.
add
(
new
ValidationMessage
(
'Framework revision
${version.frameworkRevisionShort}
'
'(
${version.frameworkAge}
)'
));
'(
${version.frameworkAge}
, channel
${version.channel}
)'
));
messages
.
add
(
new
ValidationMessage
(
'Engine revision
${version.engineRevisionShort}
'
));
messages
.
add
(
new
ValidationMessage
(
'Engine revision
${version.engineRevisionShort}
'
));
return
new
ValidationResult
(
ValidationType
.
installed
,
messages
,
return
new
ValidationResult
(
ValidationType
.
installed
,
messages
,
statusInfo:
osName
());
statusInfo:
'
${version.frameworkRevisionShort}
- channel
${version.channel}
'
);
}
}
}
}
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
1878c624
...
@@ -49,8 +49,8 @@ class FlutterCommandRunner extends CommandRunner {
...
@@ -49,8 +49,8 @@ class FlutterCommandRunner extends CommandRunner {
hide:
!
verboseHelp
,
hide:
!
verboseHelp
,
help:
'Path to your packages directory.
$packagesHelp
'
);
help:
'Path to your packages directory.
$packagesHelp
'
);
argParser
.
addOption
(
'flutter-root'
,
argParser
.
addOption
(
'flutter-root'
,
help:
'The root directory of the Flutter repository
. Uses
\$
$kFlutterRootEnvironmentVariableName
if set,
\n
'
help:
'The root directory of the Flutter repository
(uses
\$
$kFlutterRootEnvironmentVariableName
if set).'
,
'otherwise defaults to a value derived from the location of this tool.'
,
defaultsTo:
_defaultFlutterRoot
);
defaultsTo:
_defaultFlutterRoot
);
if
(
verboseHelp
)
if
(
verboseHelp
)
argParser
.
addSeparator
(
'Local build selection options (not normally required):'
);
argParser
.
addSeparator
(
'Local build selection options (not normally required):'
);
...
@@ -126,9 +126,7 @@ class FlutterCommandRunner extends CommandRunner {
...
@@ -126,9 +126,7 @@ class FlutterCommandRunner extends CommandRunner {
@override
@override
String
get
usageFooter
{
String
get
usageFooter
{
return
'Run "flutter -h -v" for verbose help output, including less commonly used options.
\n
'
return
'Run "flutter -h -v" for verbose help output, including less commonly used options.'
;
'
\n
'
'
${doctor.summaryText}
'
;
}
}
List
<
BuildConfiguration
>
get
buildConfigurations
{
List
<
BuildConfiguration
>
get
buildConfigurations
{
...
...
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