Skip to content
Snippets Groups Projects
Commit 4a27780e authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

(aws deploy) fix bug in name validation which prevented one letter hostnames

parent f3331a5c
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ verbs['deploy'] = function(args) { ...@@ -32,7 +32,7 @@ verbs['deploy'] = function(args) {
throw 'missing required argument: name of instance'; throw 'missing required argument: name of instance';
} }
var name = args[0]; 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\-_])"; throw "invalid name! must be a valid dns fragment ([z-a0-9\-_])";
} }
console.log("attempting to set up " + name + ".hacksign.in"); console.log("attempting to set up " + name + ".hacksign.in");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment