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
95a2af8b
Commit
95a2af8b
authored
Nov 17, 2015
by
Kris Giesing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix analyzer errors
parent
57bca7da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
run_mojo.dart
packages/flutter_tools/lib/src/commands/run_mojo.dart
+6
-4
No files found.
packages/flutter_tools/lib/src/commands/run_mojo.dart
View file @
95a2af8b
...
...
@@ -5,7 +5,6 @@
import
'dart:async'
;
import
'dart:io'
;
import
'package:args/command_runner.dart'
;
import
'package:logging/logging.dart'
;
import
'package:path/path.dart'
as
path
;
...
...
@@ -31,6 +30,8 @@ class RunMojoCommand extends FlutterCommand {
argParser
.
addOption
(
'devtools-path'
,
help:
'Path to mojo devtools
\'
mojo_run command.'
);
}
bool
get
requiresProjectRoot
=>
false
;
// TODO(abarth): Why not use path.absolute?
String
_makePathAbsolute
(
String
relativePath
)
{
File
file
=
new
File
(
relativePath
);
...
...
@@ -59,7 +60,7 @@ class RunMojoCommand extends FlutterCommand {
return
_makePathAbsolute
(
path
.
join
(
argResults
[
'mojo-path'
],
'out'
,
mojoBuildType
,
'mojo_shell'
));
}
BuildConfig
_getCurrentHostConfig
()
{
BuildConfig
uration
_getCurrentHostConfig
()
{
BuildConfiguration
result
;
TargetPlatform
target
=
getCurrentHostPlatformAsTarget
();
for
(
BuildConfiguration
config
in
buildConfigurations
)
{
...
...
@@ -91,7 +92,7 @@ class RunMojoCommand extends FlutterCommand {
}
else
{
final
appPath
=
_makePathAbsolute
(
argResults
[
'app'
]);
String
viewerPath
;
BuildConfig
config
=
_getCurrentHostConfig
();
BuildConfig
uration
config
=
_getCurrentHostConfig
();
if
(
config
.
type
==
BuildType
.
prebuilt
)
{
Artifact
artifact
=
ArtifactStore
.
getArtifact
(
type:
ArtifactType
.
viewer
,
targetPlatform:
TargetPlatform
.
linux
);
viewerPath
=
_makePathAbsolute
(
await
ArtifactStore
.
getPath
(
artifact
));
...
...
@@ -124,7 +125,7 @@ class RunMojoCommand extends FlutterCommand {
}
@override
Future
<
int
>
run
()
async
{
Future
<
int
>
run
InProject
()
async
{
if
((
argResults
[
'mojo-path'
]
==
null
&&
argResults
[
'devtools-path'
]
==
null
)
||
(
argResults
[
'mojo-path'
]
!=
null
&&
argResults
[
'devtools-path'
]
!=
null
))
{
_logging
.
severe
(
'Must specify either --mojo-path or --devtools-path.'
);
return
1
;
...
...
@@ -137,4 +138,5 @@ class RunMojoCommand extends FlutterCommand {
return
await
runCommandAndStreamOutput
(
await
_getShellConfig
());
}
}
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