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
35e30235
Commit
35e30235
authored
Mar 24, 2016
by
Alhaad Gokhale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In run_mojo command, parse Uri scheme to decide whether app is on local
filesystem or not.
parent
c4da1da2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
run_mojo.dart
packages/flutter_tools/lib/src/commands/run_mojo.dart
+7
-8
No files found.
packages/flutter_tools/lib/src/commands/run_mojo.dart
View file @
35e30235
...
@@ -109,19 +109,18 @@ class RunMojoCommand extends FlutterCommand {
...
@@ -109,19 +109,18 @@ class RunMojoCommand extends FlutterCommand {
args
.
add
(
'--android'
);
args
.
add
(
'--android'
);
}
}
try
{
final
Uri
appUri
=
Uri
.
parse
(
bundlePath
);
if
(
appUri
.
scheme
.
isEmpty
||
appUri
.
scheme
==
'file'
)
{
final
String
appPath
=
_makePathAbsolute
(
bundlePath
);
final
String
appPath
=
_makePathAbsolute
(
bundlePath
);
if
(
argResults
[
'android'
])
{
if
(
argResults
[
'android'
])
{
final
String
appName
=
path
.
basename
(
appPath
);
final
String
appName
=
path
.
basename
(
appPath
);
final
String
appDir
=
path
.
dirname
(
appPath
);
final
String
appDir
=
path
.
dirname
(
appPath
);
args
.
add
(
'mojo:launcher http://app/
$appName
'
);
args
.
add
(
'mojo:launcher http://app/
$appName
'
);
args
.
add
(
'--map-origin=http://app/=
$appDir
'
);
args
.
add
(
'--map-origin=http://app/=
$appDir
'
);
}
else
{
}
else
{
args
.
add
(
'mojo:launcher file://
$appPath
'
);
args
.
add
(
'mojo:launcher file://
$appPath
'
);
}
}
}
catch
(
_
)
{
}
else
{
// This means that |bundlePath| is not on the file-system, so let us treat
// it as a URL.
args
.
add
(
'mojo:launcher
$bundlePath
'
);
args
.
add
(
'mojo:launcher
$bundlePath
'
);
}
}
...
...
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