]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Print --conduit-uri in install-certificate instructions
authorJakub Vrana <jakub@vrana.cz>
Sat, 25 May 2013 03:20:20 +0000 (20:20 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sat, 25 May 2013 03:20:20 +0000 (20:20 -0700)
Test Plan:
  $ arc diff # without certificate
  $ arc --conduit-uri=http://phabricator.local/ diff # without certificate

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D6037

scripts/arcanist.php

index 84f367618f42926d539c7c0e50c70c4e69ffdecc..69ac1db6afc6dbc85d2514b790b22b38ec82a208 100755 (executable)
@@ -233,12 +233,17 @@ try {
 
   if ($need_auth) {
     if (!$user_name || !$certificate) {
+      $arc = 'arc';
+      if ($force_conduit) {
+        $arc .= csprintf(' --conduit-uri=%s', $conduit_uri);
+      }
+
       throw new ArcanistUsageException(
         phutil_console_format(
           "YOU NEED TO __INSTALL A CERTIFICATE__ TO LOGIN TO PHABRICATOR\n\n".
           "You are trying to connect to '{$conduit_uri}' but do not have ".
           "a certificate installed for this host. Run:\n\n".
-          "      $ **arc install-certificate**\n\n".
+          "      $ **{$arc} install-certificate**\n\n".
           "...to install one."));
     }
     $workflow->authenticateConduit();