1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00

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
This commit is contained in:
Nick Harper 2012-07-25 18:37:25 -07:00
parent 768a125b58
commit 8e00d3cfaf

View file

@ -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);