Commit 35e30235 authored by Alhaad Gokhale's avatar Alhaad Gokhale

In run_mojo command, parse Uri scheme to decide whether app is on local

filesystem or not.
parent c4da1da2
......@@ -109,7 +109,8 @@ class RunMojoCommand extends FlutterCommand {
args.add('--android');
}
try {
final Uri appUri = Uri.parse(bundlePath);
if (appUri.scheme.isEmpty || appUri.scheme == 'file') {
final String appPath = _makePathAbsolute(bundlePath);
if (argResults['android']) {
final String appName = path.basename(appPath);
......@@ -119,9 +120,7 @@ class RunMojoCommand extends FlutterCommand {
} else {
args.add('mojo:launcher file://$appPath');
}
} catch(_) {
// This means that |bundlePath| is not on the file-system, so let us treat
// it as a URL.
} else {
args.add('mojo:launcher $bundlePath');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment