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
d6aed1e7
Commit
d6aed1e7
authored
May 26, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a --quiet option to flutter_tools (#4213)
parent
502f734d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
logger.dart
packages/flutter_tools/lib/src/base/logger.dart
+2
-0
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+2
-1
flutter_command_runner.dart
.../flutter_tools/lib/src/runner/flutter_command_runner.dart
+6
-0
No files found.
packages/flutter_tools/lib/src/base/logger.dart
View file @
d6aed1e7
...
@@ -11,6 +11,8 @@ final AnsiTerminal terminal = new AnsiTerminal();
...
@@ -11,6 +11,8 @@ final AnsiTerminal terminal = new AnsiTerminal();
abstract
class
Logger
{
abstract
class
Logger
{
bool
get
isVerbose
=>
false
;
bool
get
isVerbose
=>
false
;
bool
quiet
=
false
;
set
supportsColor
(
bool
value
)
{
set
supportsColor
(
bool
value
)
{
terminal
.
supportsColor
=
value
;
terminal
.
supportsColor
=
value
;
}
}
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
d6aed1e7
...
@@ -412,7 +412,8 @@ class _RunAndStayResident {
...
@@ -412,7 +412,8 @@ class _RunAndStayResident {
_handleExit
();
_handleExit
();
}
else
{
}
else
{
_printHelp
();
if
(!
logger
.
quiet
)
_printHelp
();
terminal
.
singleCharMode
=
true
;
terminal
.
singleCharMode
=
true
;
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
d6aed1e7
...
@@ -34,6 +34,10 @@ class FlutterCommandRunner extends CommandRunner {
...
@@ -34,6 +34,10 @@ class FlutterCommandRunner extends CommandRunner {
abbr:
'v'
,
abbr:
'v'
,
negatable:
false
,
negatable:
false
,
help:
'Noisy logging, including all shell commands executed.'
);
help:
'Noisy logging, including all shell commands executed.'
);
argParser
.
addFlag
(
'quiet'
,
negatable:
false
,
hide:
!
verboseHelp
,
help:
'Reduce the amount of output from some commands.'
);
argParser
.
addOption
(
'device-id'
,
argParser
.
addOption
(
'device-id'
,
abbr:
'd'
,
abbr:
'd'
,
help:
'Target device id.'
);
help:
'Target device id.'
);
...
@@ -129,6 +133,8 @@ class FlutterCommandRunner extends CommandRunner {
...
@@ -129,6 +133,8 @@ class FlutterCommandRunner extends CommandRunner {
if
(
globalResults
[
'verbose'
])
if
(
globalResults
[
'verbose'
])
context
[
Logger
]
=
new
VerboseLogger
();
context
[
Logger
]
=
new
VerboseLogger
();
logger
.
quiet
=
globalResults
[
'quiet'
];
if
(
globalResults
.
wasParsed
(
'color'
))
if
(
globalResults
.
wasParsed
(
'color'
))
logger
.
supportsColor
=
globalResults
[
'color'
];
logger
.
supportsColor
=
globalResults
[
'color'
];
...
...
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