laixintao / iredis

Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.
https://iredis.xbin.io
BSD 3-Clause "New" or "Revised" License
2.52k stars 102 forks source link

FUNCTION LOAD fails with "Invalid library metadata" #489

Closed erhhung closed 5 months ago

erhhung commented 5 months ago

Using the sample function library from the documentation, FUNCTION LOAD in iredis fails while it works just fine using regular redis-cli:

$ iredis
iredis  1.14.0 (Python 3.12.1)
redis-server  7.2.4 
Home:   https://iredis.xbin.io/
Issues: https://github.com/laixintao/iredis/issues
127.0.0.1:6379> FUNCTION LOAD "#!lua name=mylib \n redis.register_function('myfunc', function(keys, args) return args[1] end)"
(error) ERROR Invalid library metadata

$ redis-cli
127.0.0.1:6379> FUNCTION LOAD "#!lua name=mylib \n redis.register_function('myfunc', function(keys, args) return args[1] end)"
"mylib"
127.0.0.1:6379> FUNCTION DELETE mylib
OK
laixintao commented 5 months ago

Thanks for reporting, now being fixed in #409 and released in v1.14.1