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
973404a2
Unverified
Commit
973404a2
authored
Oct 08, 2020
by
Jonah Williams
Committed by
GitHub
Oct 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] support powershell style help request (#67493)
parent
e3c441e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
executable.dart
packages/flutter_tools/lib/executable.dart
+5
-0
command_output_test.dart
...ter_tools/test/integration.shard/command_output_test.dart
+15
-0
No files found.
packages/flutter_tools/lib/executable.dart
View file @
973404a2
...
...
@@ -60,6 +60,11 @@ import 'src/web/web_runner.dart';
Future
<
void
>
main
(
List
<
String
>
args
)
async
{
final
bool
veryVerbose
=
args
.
contains
(
'-vv'
);
final
bool
verbose
=
args
.
contains
(
'-v'
)
||
args
.
contains
(
'--verbose'
)
||
veryVerbose
;
// Support the -? Powershell help idiom.
final
int
powershellHelpIndex
=
args
.
indexOf
(
'-?'
);
if
(
powershellHelpIndex
!=
-
1
)
{
args
[
powershellHelpIndex
]
=
'-h'
;
}
final
bool
doctor
=
(
args
.
isNotEmpty
&&
args
.
first
==
'doctor'
)
||
(
args
.
length
==
2
&&
verbose
&&
args
.
last
==
'doctor'
);
...
...
packages/flutter_tools/test/integration.shard/command_output_test.dart
View file @
973404a2
...
...
@@ -33,6 +33,21 @@ void main() {
expect
(
result
.
stdout
,
isNot
(
contains
(
'exiting with code 0'
)));
});
testWithoutContext
(
'Flutter help is shown with -? command line argument'
,
()
async
{
final
String
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'flutter'
);
final
ProcessResult
result
=
await
processManager
.
run
(<
String
>[
flutterBin
,
...
getLocalEngineArguments
(),
'-?'
,
]);
// Development tools.
expect
(
result
.
stdout
,
contains
(
'Run "flutter help <command>" for more information about a command.
\n
'
'Run "flutter help -v" for verbose help output, including less commonly used options.'
));
});
testWithoutContext
(
'flutter doctor is not verbose'
,
()
async
{
final
String
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'flutter'
);
final
ProcessResult
result
=
await
processManager
.
run
(<
String
>[
...
...
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