Index: runtime/bin/builtin.dart |
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart |
index 73736c682f6941b86092847351321e7532f2ce92..f612cfa64c93fc798268f5f61def5bda484df07c 100644 |
--- a/runtime/bin/builtin.dart |
+++ b/runtime/bin/builtin.dart |
@@ -72,6 +72,12 @@ _setPackageRoot(String packageRoot) { |
} |
String _resolveScriptUri(String cwd, String scriptName, bool isWindows) { |
+ var scriptUri = Uri.parse(scriptName); |
+ if (scriptUri.scheme == 'http') { |
Søren Gjesse
2013/06/03 07:12:07
How about https?
Ivan Posva
2013/06/03 07:22:56
What if the URI we were handed on the command line
Cutch
2013/06/03 17:55:37
Now that we are using the dart:io HttpClient we ca
Cutch
2013/06/03 17:55:37
Agreed. This code needs to be cleaned up. I'll do
|
+ _entrypoint = scriptUri; |
+ _logResolution("# Resolved script to: $_entrypoint"); |
+ return _entrypoint.toString(); |
+ } |
_logResolution("# Current working directory: $cwd"); |
_logResolution("# ScriptName: $scriptName"); |
if (isWindows) { |
@@ -195,7 +201,11 @@ String _filePathFromPackageUri(Uri uri) { |
if (_packageRoot != null) { |
path = "${_packageRoot}${uri.path}"; |
Ivan Posva
2013/06/03 07:22:56
What is confusing in this whole scheme is that if
Cutch
2013/06/03 17:55:37
See my other comment. This function needs to be cl
|
} else { |
- path = _entrypoint.resolve('packages/${uri.path}').path; |
+ if (_entrypoint.scheme == 'http') { |
Søren Gjesse
2013/06/03 07:12:07
Ditto.
|
+ path = _entrypoint.resolve('packages/${uri.path}').toString(); |
+ } else { |
+ path = _entrypoint.resolve('packages/${uri.path}').path; |
+ } |
} |
_logResolution("# Package: $path"); |