Skip to content

Commit

Permalink
Merge pull request #200 from pelias/add-checks-for-localhost-drop
Browse files Browse the repository at this point in the history
Add checks for localhost drop
  • Loading branch information
trescube authored Jan 4, 2017
2 parents d057d3f + 92e5ecf commit 4f0012f
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 4f0012f

Please sign in to comment.