Skip to content

Commit

Permalink
added localhost check for ALL hosts, not just first
Browse files Browse the repository at this point in the history
  • Loading branch information
trescube committed Dec 29, 2016
1 parent d057d3f commit 92e5ecf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/drop_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ function drop(){
});
}

// check all hosts to see if any is not localhost
function warnIfNotLocal() {
if(config.esclient.hosts[0].host !== "localhost") {
if (config.esclient.hosts.some((env) => { return env.host !== 'localhost'; } )) {
console.log(colors.red("WARNING: DROPPING SCHEMA NOT ON LOCALHOST"));
}

}

function prompt( yes, no ){
Expand Down

0 comments on commit 92e5ecf

Please sign in to comment.