commit | 45643c26f5196cc1b31917cb76fe59d1de18e11a | [log] [tgz] |
---|---|---|
author | Zichang Guo <zichangguo@google.com> | Thu Aug 13 23:48:52 2020 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Thu Aug 13 23:48:52 2020 +0000 |
tree | 194bf859524c3b7fb68e2e041bb2f55779521a6b | |
parent | 9bac327e32e1ac58c6e8fb33315bfca5b7857529 [diff] |
add comments dartdev run Resolve the comment of https://dart-review.googlesource.com/c/sdk/+/157107 Change-Id: I328d55a95f876651e9864d8634edd184601556ec Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157661 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Zichang Guo <zichangguo@google.com>
diff --git a/pkg/dartdev/lib/src/commands/run.dart b/pkg/dartdev/lib/src/commands/run.dart index d4685fe..f9e0859 100644 --- a/pkg/dartdev/lib/src/commands/run.dart +++ b/pkg/dartdev/lib/src/commands/run.dart
@@ -228,7 +228,13 @@ : args.sublist(pathIndex + 1); try { path = Uri.parse(path).toFilePath(); - } catch (_) {} + } catch (_) { + // Input path will either be a valid path or a file uri + // (e.g /directory/file.dart or file:///directory/file.dart). We will try + // parsing it as a Uri, but if parsing failed for any reason (likely + // because path is not a file Uri), `path` will be passed without + // modification to the VM. + } VmInteropHandler.run(path, runArgs); return 0; }