]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Print out the locations of libphutil and arcanist when arc is run with --trace
authorepriestley <git@epriestley.com>
Fri, 6 Jul 2012 17:05:49 +0000 (10:05 -0700)
committerepriestley <git@epriestley.com>
Fri, 6 Jul 2012 17:05:49 +0000 (10:05 -0700)
Summary: We currently print //additional// libraries, but not the core libraries, which makes diagnosing include problems more difficult than necessary.

Test Plan: ran `arc derp --trace`, got libphutil/arcanist locations

Reviewers: btrahan

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D2929

scripts/arcanist.php

index 88344341fea86dba0084ec633bcbe01ef7f2be90..dfc9e01dc54bc5dfc85db4e781a09e42ceec65df 100755 (executable)
@@ -62,9 +62,17 @@ $argv = $args->getUnconsumedArgumentVector();
 $args = array_values($argv);
 
 $working_directory = getcwd();
+$console = PhutilConsole::getConsole();
 
 try {
 
+  if ($config_trace_mode) {
+    $phutil_location = phutil_get_library_root('phutil');
+    $arcanist_location = phutil_get_library_root('arcanist');
+    $console->writeErr("libphutil loaded from '{$phutil_location}'.\n");
+    $console->writeErr("arcanist loaded from '{$arcanist_location}'.\n");
+  }
+
   if (!$args) {
     throw new ArcanistUsageException("No command provided. Try 'arc help'.");
   }