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
d4185802
Commit
d4185802
authored
Mar 24, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print the os from flutter doctor
parent
d7e4f78b
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 @
d4185802
...
...
@@ -14,6 +14,18 @@ import 'globals.dart';
import
'ios/ios_workflow.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
{
Doctor
()
{
_validators
.
add
(
new
_FlutterValidator
());
...
...
@@ -179,11 +191,10 @@ class _FlutterValidator extends DoctorValidator {
messages
.
add
(
new
ValidationMessage
(
'Flutter root at
${version.flutterRoot}
'
));
messages
.
add
(
new
ValidationMessage
(
'Framework revision
${version.frameworkRevisionShort}
'
'(
${version.frameworkAge}
)'
));
'(
${version.frameworkAge}
, channel
${version.channel}
)'
));
messages
.
add
(
new
ValidationMessage
(
'Engine revision
${version.engineRevisionShort}
'
));
return
new
ValidationResult
(
ValidationType
.
installed
,
messages
,
statusInfo:
'
${version.frameworkRevisionShort}
- channel
${version.channel}
'
);
return
new
ValidationResult
(
ValidationType
.
installed
,
messages
,
statusInfo:
osName
());
}
}
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
d4185802
...
...
@@ -49,8 +49,8 @@ class FlutterCommandRunner extends CommandRunner {
hide:
!
verboseHelp
,
help:
'Path to your packages directory.
$packagesHelp
'
);
argParser
.
addOption
(
'flutter-root'
,
help:
'The root directory of the Flutter repository
. Uses
\$
$kFlutterRootEnvironmentVariableName
if set,
\n
'
'otherwise defaults to a value derived from the location of this tool.'
,
defaultsTo:
_defaultFlutterRoot
);
help:
'The root directory of the Flutter repository
(uses
\$
$kFlutterRootEnvironmentVariableName
if set).'
,
defaultsTo:
_defaultFlutterRoot
);
if
(
verboseHelp
)
argParser
.
addSeparator
(
'Local build selection options (not normally required):'
);
...
...
@@ -126,9 +126,7 @@ class FlutterCommandRunner extends CommandRunner {
@override
String
get
usageFooter
{
return
'Run "flutter -h -v" for verbose help output, including less commonly used options.
\n
'
'
\n
'
'
${doctor.summaryText}
'
;
return
'Run "flutter -h -v" for verbose help output, including less commonly used options.'
;
}
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