Skip to content

Commit

Permalink
Merge pull request #128 from antoineleclair/redis-port-fix
Browse files Browse the repository at this point in the history
Fix #116, --redis-port was ignored when no host specified
  • Loading branch information
joeferner committed Mar 22, 2014
2 parents da1ee16 + 19e0a53 commit a7028a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/redis-commander.js
Expand Up @@ -74,7 +74,7 @@ myUtils.getConfig(function (err, config) {
console.log(err);
process.exit();
}
if (args['redis-host'] || args['redis-socket']) {
if (args['redis-host'] || args['redis-port'] || args['redis-socket']) {
var db = parseInt(args['redis-db']);
if (db == null || isNaN(db)) {
db = 0
Expand All @@ -85,6 +85,7 @@ myUtils.getConfig(function (err, config) {
"password": args['redis-password'] || "",
"dbIndex": db
};

if (!myUtils.containsConnection(config.default_connections, newDefault)) {
redisConnections.push(redis.createClient(newDefault.port, newDefault.host));
if (args['redis-password']) {
Expand Down

0 comments on commit a7028a1

Please sign in to comment.