Skip to content

Commit c0d5755

Browse files
author
Michael Tekel
committed
newline in wrong place
1 parent c405667 commit c0d5755

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/redis-cli.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static sds cliFormatReply(redisReply *r, char *prefix) {
159159
sds out = sdsempty();
160160
switch (r->type) {
161161
case REDIS_REPLY_ERROR:
162-
if (config.tty && !config.bare_output ) out = sdscat(out,"(error) ");
162+
if (config.tty && !config.bare_output) out = sdscat(out,"(error) ");
163163
out = sdscatprintf(out,"%s\n", r->str);
164164
break;
165165
case REDIS_REPLY_STATUS:
@@ -173,6 +173,7 @@ static sds cliFormatReply(redisReply *r, char *prefix) {
173173
case REDIS_REPLY_STRING:
174174
if (config.raw_output || !config.tty || config.bare_output) {
175175
out = sdscatlen(out,r->str,r->len);
176+
out = sdscat(out, "\n");
176177
} else {
177178
/* If you are producing output for the standard output we want
178179
* a more interesting output with quoted characters and so forth */
@@ -224,9 +225,8 @@ static sds cliFormatReply(redisReply *r, char *prefix) {
224225
} else {
225226
sds tmp;
226227
for (unsigned int i = 0; i < r->elements; i++) {
227-
tmp = cliFormatReply(r->element[i],'A');
228+
tmp = cliFormatReply(r->element[i],NULL);
228229
out = sdscatlen(out,tmp,sdslen(tmp));
229-
out = sdscat(out, "\n");
230230
sdsfree(tmp);
231231
}
232232
}

0 commit comments

Comments
 (0)