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
57b34227
Commit
57b34227
authored
Apr 02, 2017
by
Ian Hickson
Committed by
GitHub
Apr 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bold each line individually (#9069)
This should make the message in Travis logs look better.
parent
ae899486
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
11 deletions
+21
-11
executable.dart
packages/flutter_tools/lib/executable.dart
+1
-1
logger.dart
packages/flutter_tools/lib/src/base/logger.dart
+12
-4
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+1
-1
usage.dart
packages/flutter_tools/lib/src/usage.dart
+6
-4
context.dart
packages/flutter_tools/test/src/context.dart
+1
-1
No files found.
packages/flutter_tools/lib/executable.dart
View file @
57b34227
...
...
@@ -294,7 +294,7 @@ Future<String> _doctorText() async {
Future
<
int
>
_exit
(
int
code
)
async
{
if
(
flutterUsage
.
isFirstRun
)
flutterUsage
.
print
Usag
e
();
flutterUsage
.
print
Welcom
e
();
// Send any last analytics calls that are in progress without overly delaying
// the tool's exit (we wait a maximum of 250ms).
...
...
packages/flutter_tools/lib/src/base/logger.dart
View file @
57b34227
...
...
@@ -277,14 +277,22 @@ class AnsiTerminal {
bool
supportsColor
;
String
bolden
(
String
str
)
=>
supportsColor
?
'
$_bold$str$_reset
'
:
str
;
String
bolden
(
String
message
)
{
if
(!
supportsColor
)
return
message
;
final
StringBuffer
result
=
new
StringBuffer
();
for
(
String
line
in
message
.
split
(
'
\n
'
))
result
.
writeln
(
'
$_bold$line$_reset
'
);
return
result
.
toString
();
}
String
clearScreen
()
=>
supportsColor
?
_clear
:
'
\n\n
'
;
set
singleCharMode
(
bool
value
)
{
// TODO(goderbauer): instead of trying to set lineMode and then catching [_ENOTTY] or [_INVALID_HANDLE],
// we should check beforehand if stdin is connected to a terminal or not
// (requires https://github.com/dart-lang/sdk/issues/29083 to be resolved).
// TODO(goderbauer): instead of trying to set lineMode and then catching
// [_ENOTTY] or [_INVALID_HANDLE], we should check beforehand if stdin is
// connected to a terminal or not.
// (Requires https://github.com/dart-lang/sdk/issues/29083 to be resolved.)
try
{
// The order of setting lineMode and echoMode is important on Windows.
if
(
value
)
{
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
57b34227
...
...
@@ -116,7 +116,7 @@ abstract class FlutterCommand extends Command<Null> {
final
UsageTimer
analyticsTimer
=
usagePath
==
null
?
null
:
flutterUsage
.
startTimer
(
name
);
if
(
flutterUsage
.
isFirstRun
)
flutterUsage
.
print
Usag
e
();
flutterUsage
.
print
Welcom
e
();
return
verifyThenRunCommand
().
whenComplete
(()
{
final
int
ms
=
stopwatch
.
elapsedMilliseconds
;
...
...
packages/flutter_tools/lib/src/usage.dart
View file @
57b34227
...
...
@@ -47,7 +47,7 @@ class Usage {
Analytics
_analytics
;
bool
_printed
Usag
e
=
false
;
bool
_printed
Welcom
e
=
false
;
bool
_suppressAnalytics
=
false
;
bool
get
isFirstRun
=>
_analytics
.
firstRun
;
...
...
@@ -108,10 +108,12 @@ class Usage {
await
_analytics
.
waitForLastPing
(
timeout:
const
Duration
(
milliseconds:
250
));
}
void
printUsage
()
{
if
(
_printedUsage
)
void
printWelcome
()
{
// This gets called if it's the first run by the selected command, if any,
// and on exit, in case there was no command.
if
(
_printedWelcome
)
return
;
_printed
Usag
e
=
true
;
_printed
Welcom
e
=
true
;
printStatus
(
''
);
printStatus
(
'''
...
...
packages/flutter_tools/test/src/context.dart
View file @
57b34227
...
...
@@ -218,7 +218,7 @@ class MockUsage implements Usage {
Future
<
Null
>
ensureAnalyticsSent
()
=>
new
Future
<
Null
>.
value
();
@override
void
print
Usag
e
()
{
}
void
print
Welcom
e
()
{
}
}
class
_MockUsageTimer
implements
UsageTimer
{
...
...
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