Skip to content

Commit 935a844

Browse files
author
Ruben Bridgewater
committed
Mrginal bug fixes for command command and brpop command
1 parent 063b5be commit 935a844

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Features
44

55
- Rebuild the commands with the newest unstable release
66

7+
Bugfix
8+
9+
- Fixed command command returning the wrong arity due to a Redis bug
10+
- Fixed brpop command returning the wrong keystop due to a Redis bug
11+
712
## v.1.1.0 - 09 Feb, 2016
813

914
Features

commands.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"noscript"
107107
],
108108
"keyStart": 1,
109-
"keyStop": 1,
109+
"keyStop": -2,
110110
"step": 1
111111
},
112112
"brpoplpush": {
@@ -141,7 +141,7 @@
141141
"step": 0
142142
},
143143
"command": {
144-
"arity": 0,
144+
"arity": 1,
145145
"flags": [
146146
"readonly",
147147
"loading",

tools/build.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ redis.command(function (err, res) {
1414
}
1515

1616
var commands = res.reduce(function (prev, current) {
17+
// https://github.com/antirez/redis/issues/2598
18+
if (current[0] === 'brpop' && current[4] === 1) {
19+
current[4] = -2;
20+
}
1721
prev[current[0]] = {
18-
arity: current[1],
22+
arity: current[1] || 1, // https://github.com/antirez/redis/pull/2986
1923
flags: current[2],
2024
keyStart: current[3],
2125
keyStop: current[4],
@@ -24,7 +28,8 @@ redis.command(function (err, res) {
2428
return prev;
2529
}, {});
2630

27-
// Future proof. Redis might implement this soon
31+
// Future proof. Redis might implement this at some point
32+
// https://github.com/antirez/redis/pull/2982
2833
if (!commands.quit) {
2934
commands.quit = {
3035
arity: 1,

0 commit comments

Comments
 (0)