fix: preserve CLI exit codes, log tracebacks, sanitize search errors, validate fixture

This commit is contained in:
Igor Lins e Silva
2026-04-07 17:38:53 -03:00
parent c9135aad67
commit 5ac4947d02
5 changed files with 46 additions and 15 deletions
+11 -8
View File
@@ -97,16 +97,19 @@ def cmd_mine(args):
def cmd_search(args):
from .searcher import search
from .searcher import search, SearchError
palace_path = os.path.expanduser(args.palace) if args.palace else MempalaceConfig().palace_path
search(
query=args.query,
palace_path=palace_path,
wing=args.wing,
room=args.room,
n_results=args.results,
)
try:
search(
query=args.query,
palace_path=palace_path,
wing=args.wing,
room=args.room,
n_results=args.results,
)
except SearchError:
sys.exit(1)
def cmd_wakeup(args):