Index: runtime/bin/builtin.dart |
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart |
index 66f61987080b3eea9535b461d13e67f9ad025c18..716ec71c3a0cff95b97e457f1104fe1d9057ca08 100644 |
--- a/runtime/bin/builtin.dart |
+++ b/runtime/bin/builtin.dart |
@@ -73,6 +73,12 @@ _setPackageRoot(String packageRoot) { |
} |
String _resolveScriptUri(String cwd, String scriptName, bool isWindows) { |
+ var scriptUri = Uri.parse(scriptName); |
+ if (scriptUri.scheme == 'http') { |
+ _entrypoint = scriptUri; |
+ _logResolution("# Resolved script to: $_entrypoint"); |
+ return _entrypoint.toString(); |
+ } |
_logResolution("# Current working directory: $cwd"); |
_logResolution("# ScriptName: $scriptName"); |
if (isWindows) { |
@@ -196,7 +202,11 @@ String _filePathFromPackageUri(Uri uri) { |
if (_packageRoot != null) { |
path = "${_packageRoot}${uri.path}"; |
} else { |
- path = _entrypoint.resolve('packages/${uri.path}').path; |
+ if (_entrypoint.scheme == 'http') { |
+ path = _entrypoint.resolve('packages/${uri.path}').toString(); |
+ } else { |
+ path = _entrypoint.resolve('packages/${uri.path}').path; |
+ } |
} |
_logResolution("# Package: $path"); |