Skip to content

Commit

Permalink
Improve error message if WORKSPACE file is not found
Browse files Browse the repository at this point in the history
--
MOS_MIGRATED_REVID=88746523
  • Loading branch information
kchodorow committed Mar 18, 2015
1 parent 7ccc063 commit a2c6bc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/cpp/blaze_startup_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a2c6bc7

Please sign in to comment.