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
b549e829
Unverified
Commit
b549e829
authored
Jul 14, 2021
by
Jonah Williams
Committed by
GitHub
Jul 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] support trailing args (#86431)
parent
4d96a3fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
packages.dart
packages/flutter_tools/lib/src/commands/packages.dart
+2
-3
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+0
-1
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+0
-13
command_output_test.dart
...ter_tools/test/integration.shard/command_output_test.dart
+15
-0
No files found.
packages/flutter_tools/lib/src/commands/packages.dart
View file @
b549e829
...
...
@@ -249,9 +249,8 @@ class PackagesForwardCommand extends FlutterCommand {
}
class
PackagesPassthroughCommand
extends
FlutterCommand
{
PackagesPassthroughCommand
()
{
requiresPubspecYaml
();
}
@override
ArgParser
argParser
=
ArgParser
.
allowAnything
();
@override
String
get
name
=>
'pub'
;
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
b549e829
...
...
@@ -159,7 +159,6 @@ abstract class FlutterCommand extends Command<void> {
@override
ArgParser
get
argParser
=>
_argParser
;
final
ArgParser
_argParser
=
ArgParser
(
allowTrailingOptions:
false
,
usageLineLength:
globals
.
outputPreferences
.
wrapText
?
globals
.
outputPreferences
.
wrapColumn
:
null
,
);
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
b549e829
...
...
@@ -1620,19 +1620,6 @@ void main() {
);
});
// Verify that we help the user correct an option ordering issue
testUsingContext
(
'produces sensible error message'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
final
CreateCommand
command
=
CreateCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
expect
(
runner
.
run
(<
String
>[
'create'
,
projectDir
.
path
,
'--pub'
]),
throwsToolExit
(
exitCode:
2
,
message:
'Try moving --pub'
),
);
});
testUsingContext
(
'fails when file exists where output directory should be'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
final
CreateCommand
command
=
CreateCommand
();
...
...
packages/flutter_tools/test/integration.shard/command_output_test.dart
View file @
b549e829
...
...
@@ -247,4 +247,19 @@ void main() {
'A crash report has been written to'
,
));
});
testWithoutContext
(
'flutter supports trailing args'
,
()
async
{
final
String
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'flutter'
);
final
String
helloWorld
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'examples'
,
'hello_world'
);
final
ProcessResult
result
=
await
processManager
.
run
(<
String
>[
flutterBin
,
'test'
,
'test/hello_test.dart'
,
'-r'
,
'json'
,
],
workingDirectory:
helloWorld
);
expect
(
result
.
exitCode
,
0
);
expect
(
result
.
stderr
,
isEmpty
);
});
}
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