| Index: runtime/bin/main.cc
|
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
|
| index 6c8ca4b2a23e5a5a3d1af7a9193603a0fe1906a5..d7bfb3b963c9bbf5137022514a9aaad2e26d9f59 100644
|
| --- a/runtime/bin/main.cc
|
| +++ b/runtime/bin/main.cc
|
| @@ -207,7 +207,7 @@ static bool ProcessVerboseOption(const char* arg,
|
| static bool ProcessPackageRootOption(const char* arg,
|
| CommandLineOptions* vm_options) {
|
| ASSERT(arg != NULL);
|
| - if (*arg == '\0' || *arg == '-') {
|
| + if (*arg == '-') {
|
| return false;
|
| }
|
| commandline_package_root = arg;
|
| @@ -216,9 +216,9 @@ static bool ProcessPackageRootOption(const char* arg,
|
|
|
|
|
| static bool ProcessPackagesOption(const char* arg,
|
| - CommandLineOptions* vm_options) {
|
| + CommandLineOptions* vm_options) {
|
| ASSERT(arg != NULL);
|
| - if ((*arg == '\0') || (*arg == '-')) {
|
| + if (*arg == '-') {
|
| return false;
|
| }
|
| commandline_packages_file = arg;
|
| @@ -592,6 +592,16 @@ static int ParseArguments(int argc,
|
| "file is invalid.\n");
|
| return -1;
|
| }
|
| + if ((commandline_package_root != NULL) &&
|
| + (strlen(commandline_package_root) == 0)) {
|
| + Log::PrintErr("Empty package root specified.\n");
|
| + return -1;
|
| + }
|
| + if ((commandline_packages_file != NULL) &&
|
| + (strlen(commandline_packages_file) == 0)) {
|
| + Log::PrintErr("Empty package file name specified.\n");
|
| + return -1;
|
| + }
|
| if (is_noopt && gen_snapshot_kind != kNone) {
|
| Log::PrintErr("Generating a snapshot with dart_noopt is invalid.\n");
|
| return -1;
|
|
|