From 5744b1fde74d97317448954bd759ab6183fdf5f0 Mon Sep 17 00:00:00 2001 From: yetone Date: Sun, 23 Feb 2025 01:55:27 +0800 Subject: [PATCH] fix: add err msg for rag service (#1354) --- lua/avante/rag_service.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/avante/rag_service.lua b/lua/avante/rag_service.lua index 37aa40f..b1d210c 100644 --- a/lua/avante/rag_service.lua +++ b/lua/avante/rag_service.lua @@ -68,7 +68,12 @@ function M.launch_rag_service() openai_base_url, image ) - vim.fn.system(cmd_) + local result_ = vim.fn.system(cmd_) + local exit_code = vim.v.shell_error + if exit_code ~= 0 then + Utils.error(string.format("failed to start rag service: %s", result_)) + return false + end Utils.debug(string.format("container %s started", container_name)) return true end