| 1730 | } |
| 1731 | |
| 1732 | void evalShaCommand(client *c) { |
| 1733 | /* Explicitly feed monitor here so that lua commands appear after their |
| 1734 | * script command. */ |
| 1735 | replicationFeedMonitors(c,server.monitors,c->db->id,c->argv,c->argc); |
| 1736 | if (sdslen(c->argv[1]->ptr) != 40) { |
| 1737 | /* We know that a match is not possible if the provided SHA is |
| 1738 | * not the right length. So we return an error ASAP, this way |
| 1739 | * evalGenericCommand() can be implemented without string length |
| 1740 | * sanity check */ |
| 1741 | addReplyErrorObject(c, shared.noscripterr); |
| 1742 | return; |
| 1743 | } |
| 1744 | if (!(c->flags & CLIENT_LUA_DEBUG)) |
| 1745 | evalGenericCommand(c,1); |
| 1746 | else { |
| 1747 | addReplyError(c,"Please use EVAL instead of EVALSHA for debugging"); |
| 1748 | return; |
| 1749 | } |
| 1750 | } |
| 1751 | |
| 1752 | void scriptCommand(client *c) { |
| 1753 | if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) { |
nothing calls this directly
no test coverage detected