]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Handle `arc --version`.
authorJoshua Spence <josh@joshuaspence.com>
Sat, 24 May 2014 02:54:04 +0000 (19:54 -0700)
committerepriestley <git@epriestley.com>
Sat, 24 May 2014 02:54:04 +0000 (19:54 -0700)
Summary: It seems reasonable to transform `arc --version` into `arc version`. The version command is similar to the help command in that it is a command that users unfamiliar with Arcanist will probably try to run at some stage.

Test Plan: Ran `arc --version`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9274

src/configuration/ArcanistConfiguration.php

index 790dc195380b8058076eec93dfa09b5c1f06d7ed..b5a89f1aacdc788e75dc481573058f35827c4eed 100644 (file)
@@ -27,6 +27,9 @@ class ArcanistConfiguration {
       // Special-case "arc --help" to behave like "arc help" instead of telling
       // you to type "arc help" without being helpful.
       $command = 'help';
+    } else if ($command == '--version') {
+      // Special-case "arc --version" to behave like "arc version".
+      $command = 'version';
     }
 
     return idx($this->buildAllWorkflows(), $command);