diff options
author | 2015-03-16 18:32:50 +0000 | |
---|---|---|
committer | 2015-03-18 13:40:02 +0000 | |
commit | a2c6bc71c28f567e3115b1ea740b37630aa16ffb (patch) | |
tree | 589dfea1de8a2299d903527cddbb609ecc758749 | |
parent | 7ccc0633de025526b94f0fd3aaa8f9ed6f057941 (diff) |
Improve error message if WORKSPACE file is not found
--
MOS_MIGRATED_REVID=88746523
-rw-r--r-- | src/main/cpp/blaze_startup_options.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/cpp/blaze_startup_options.cc b/src/main/cpp/blaze_startup_options.cc index 569c561e7b..ffbe403154 100644 --- a/src/main/cpp/blaze_startup_options.cc +++ b/src/main/cpp/blaze_startup_options.cc @@ -91,7 +91,10 @@ string BlazeStartupOptions::GetWorkspace(const string &cwd) { } workspace = blaze_util::Dirname(workspace); } while (!workspace.empty() && workspace != "/"); - return ""; + + fprintf(stderr, "Could not find WORKSPACE file at or above %s.\n" + "Is your current directory in a Bazel source tree?\n", cwd.c_str()); + exit(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR); } blaze_exit_code::ExitCode BlazeStartupOptions::ProcessArgExtra( |