From 4a27780e9b8dcee5d8f552cdb6ddc71ba464de2c Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Mon, 30 Jan 2012 19:23:24 -0700
Subject: [PATCH] (aws deploy) fix bug in name validation which prevented one
 letter hostnames

---
 scripts/deploy.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/deploy.js b/scripts/deploy.js
index dee25d153..dcb55bdc0 100755
--- a/scripts/deploy.js
+++ b/scripts/deploy.js
@@ -32,7 +32,7 @@ verbs['deploy'] = function(args) {
     throw 'missing required argument: name of instance';
   }
   var name = args[0];
-  if (!/^[a-z][0-9a-z_\-]+$/.test(name)) {
+  if (!/^[a-z][0-9a-z_\-]*$/.test(name)) {
     throw "invalid name!  must be a valid dns fragment ([z-a0-9\-_])";
   }
   console.log("attempting to set up " + name + ".hacksign.in");
-- 
GitLab