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
dde6bd20
Commit
dde6bd20
authored
Oct 29, 2015
by
Alhaad Gokhale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a common flag for both android and linux.
parent
587f6e27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
run_mojo.dart
packages/flutter_tools/lib/src/commands/run_mojo.dart
+4
-9
No files found.
packages/flutter_tools/lib/src/commands/run_mojo.dart
View file @
dde6bd20
...
...
@@ -27,8 +27,7 @@ class RunMojoCommand extends Command {
argParser
.
addFlag
(
'mojo-release'
,
negatable:
false
,
help:
'Use Release build of mojo (default)'
);
argParser
.
addOption
(
'app'
,
defaultsTo:
'app.flx'
);
argParser
.
addOption
(
'mojo-path'
,
help:
'Path to directory containing mojo_shell and services. This is required for a Linux build.'
);
argParser
.
addOption
(
'devtools-path'
,
help:
'Path to the mojo_run script in mojo devtools. This is required for an Android build.'
);
argParser
.
addOption
(
'mojo-path'
,
help:
'Path to directory containing mojo_shell and services for Linux and to mojo devtools from Android.'
);
}
// TODO(abarth): Why not use path.absolute?
...
...
@@ -80,15 +79,11 @@ class RunMojoCommand extends Command {
@override
Future
<
int
>
run
()
async
{
if
(
argResults
[
'mojo-path'
]
==
null
&&
!
argResults
[
'android'
]
)
{
_logging
.
severe
(
'Must specify --mojo-path
for Linux
.'
);
if
(
argResults
[
'mojo-path'
]
==
null
)
{
_logging
.
severe
(
'Must specify --mojo-path.'
);
return
1
;
}
if
(
argResults
[
'devtools-path'
]
==
null
&&
argResults
[
'android'
])
{
_logging
.
severe
(
'Must specify --devtools-path for Android.'
);
return
1
;
}
if
(
argResults
[
'mojo-debug'
]
&&
argResults
[
'mojo-release'
])
{
_logging
.
severe
(
'Cannot specify both --mojo-debug and --mojo-release'
);
return
1
;
...
...
@@ -103,7 +98,7 @@ class RunMojoCommand extends Command {
args
.
addAll
(
argResults
.
rest
);
if
(
argResults
[
'android'
])
{
return
_runAndroid
(
argResults
[
'devtools-path'
]
,
mojoConfig
,
appPath
,
args
);
return
_runAndroid
(
mojoPath
,
mojoConfig
,
appPath
,
args
);
}
else
{
return
_runLinux
(
mojoPath
,
mojoConfig
,
appPath
,
args
);
}
...
...
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