From: Nick Harper Date: Thu, 26 Jul 2012 01:37:25 +0000 (-0700) Subject: Allow hyphens in arc library names X-Git-Tag: conduit-6~187 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8e00d3cfaf0150d39c406bd528d6914795164178;p=arcanist.git Allow hyphens in arc library names Summary: We've had these in our library names and they're quite useful as word separators. Allowing them shouldn't cause any trouble. Test Plan: ran arc liberate in an empty directory, and it didn't complain when I gave it a name with a hyphen. Reviewers: epriestley, vrana, jungejason Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3070 --- diff --git a/src/workflow/ArcanistLiberateWorkflow.php b/src/workflow/ArcanistLiberateWorkflow.php index 2fee574f..b2713c76 100644 --- a/src/workflow/ArcanistLiberateWorkflow.php +++ b/src/workflow/ArcanistLiberateWorkflow.php @@ -215,10 +215,11 @@ EOTEXT echo "Choose a name for the new library.\n"; do { $name = phutil_console_prompt('What do you want to name this library?'); - if (preg_match('/^[a-z]+$/', $name)) { + if (preg_match('/^[a-z-]+$/', $name)) { break; } else { - echo "Library name should contain only lowercase letters.\n"; + echo "Library name should contain only lowercase letters and ". + "hyphens.\n"; } } while (true);