fix auth check breaking build script

pull/39/head
nightwing 2015-02-20 18:34:47 +00:00
rodzic 55ee409c76
commit 3b280a079a
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -90,9 +90,10 @@ module.exports = function(config, optimist) {
require("child_process").exec("tmux -L cloud91.9 kill-server", function(){});
var isLocalhost = host == "localhost" || host == "127.0.0.1";
if ((!argv.auth || !argv.auth.match(":")) && !isLocalhost) {
if (!/:/.test(argv.auth) && !isLocalhost) {
console.log("Authentication is required when not running on localhost.\nPlease use -a user:pass or --listen localhost to listen locally.");
process.exit(255);
console.log("switching to localhost");
host == "127.0.0.1";
}
var auth = (argv.auth || ":").split(":");