Skip to content
Closed
5 changes: 5 additions & 0 deletions redisvl/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys

from redisvl.cli.index import Index
from redisvl.cli.migrate import Migrate
from redisvl.cli.stats import Stats
from redisvl.cli.version import Version
from redisvl.utils.log import get_logger
Expand All @@ -16,6 +17,7 @@ def _usage():
"\tindex Index manipulation (create, delete, etc.)",
"\tversion Obtain the version of RedisVL",
"\tstats Obtain statistics about an index",
"\tmigrate Index migration planning and execution",
]
return "\n".join(usage) + "\n"

Expand Down Expand Up @@ -49,3 +51,6 @@ def version(self):
def stats(self):
Stats()
exit(0)

def migrate(self):
Migrate()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing exit(0) in CLI migrate command handler

Low Severity

The migrate() method in RedisVlCLI does not call exit(0) after Migrate(), unlike index(), version(), and stats() which all explicitly call exit(0). This is inconsistent and means the process relies on natural termination rather than an explicit exit code, which could matter if the CLI is called from scripts checking exit codes.

Fix in Cursor Fix in Web

Loading
Loading