From 288168640724ea735800ca41516871fc37426e13 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Fri, 23 May 2014 19:54:04 -0700 Subject: [PATCH] Handle `arc --version`. 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/configuration/ArcanistConfiguration.php b/src/configuration/ArcanistConfiguration.php index 790dc195..b5a89f1a 100644 --- a/src/configuration/ArcanistConfiguration.php +++ b/src/configuration/ArcanistConfiguration.php @@ -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);