From 8e00d3cfaf0150d39c406bd528d6914795164178 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Wed, 25 Jul 2012 18:37:25 -0700 Subject: [PATCH] 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 --- src/workflow/ArcanistLiberateWorkflow.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.43.0