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>
This commit is contained in:
Zichang Guo 2020-08-13 23:48:52 +00:00 committed by commit-bot@chromium.org
parent 9bac327e32
commit 45643c26f5

View file

@ -228,7 +228,13 @@ class RunCommand extends DartdevCommand<int> {
: 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;
}