Skip to content

Commit 284dc0a

Browse files
authored
correcting return value when destination key already exists for copy command (#2415)
As per the current design of copy commands it returns zero when destination already exist. this is also documented in the `Returns` section below this text.
1 parent ec99cd7 commit 284dc0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commands/copy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ By default, the `destination` key is created in the logical database used by the
55
connection. The `DB` option allows specifying an alternative logical database
66
index for the destination key.
77

8-
The command returns an error when the `destination` key already exists. The
8+
The command returns zero when the `destination` key already exists. The
99
`REPLACE` option removes the `destination` key before copying the value to it.
1010

1111
@return
@@ -21,4 +21,4 @@ The command returns an error when the `destination` key already exists. The
2121
SET dolly "sheep"
2222
COPY dolly clone
2323
GET clone
24-
```
24+
```

0 commit comments

Comments
 (0)