]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Clarify confusing error message about missing .arcconfig vs missing conduit.
authorepriestley <epriestley@javelinjs.com>
Thu, 13 Jan 2011 23:36:15 +0000 (15:36 -0800)
committerepriestley <epriestley@javelinjs.com>
Thu, 13 Jan 2011 23:36:15 +0000 (15:36 -0800)
Summary:

Test Plan:

Reviewers:

CC:

scripts/arcanist.php

index b838da1d0f42b9087598af3a24b5aeb80c5825d8..7d65b6b8d298dbe4d6a1afc57a1b135f6494a8eb 100755 (executable)
@@ -97,6 +97,12 @@ try {
                         $need_repository_api;
 
   if ($need_working_copy) {
+    if (!$working_copy->getProjectRoot()) {
+      throw new ArcanistUsageException(
+        "There is no '.arcconfig' file in this directory or any parent ".
+        "directory. Create a '.arcconfig' file to configure this project ".
+        "for use with Arcanist.");
+    }
     $workflow->setWorkingCopy($working_copy);
   }