From 38a7b74872e5e0dac17f1782546ef07e47929da4 Mon Sep 17 00:00:00 2001 From: lixulun Date: Thu, 26 Mar 2026 10:40:59 +0800 Subject: [PATCH] refactor: use error function for missing tool detection - Add `error` helper to print red-colored error messages - Replace hardcoded "not found" strings with `error` calls - Add checks for uv, pipx, nodejs, pnpm, and mise --- , | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/, b/, index dc3799c..cd0eda4 100755 --- a/, +++ b/, @@ -11,8 +11,17 @@ echo "PATH:" $(echo "$PATH" | tr ':' '\n' | wc -l) "paths [Please run ',path' to echo "" -echo "Ruby:" $(command -v ruby || echo "not found") -echo "Python:" $(command -v python || echo "not found") +error() { + echo -e "\033[31m$1\033[0m" +} -echo "llm:" $(command -v llm || echo "not found") +echo "Ruby:" $(command -v ruby || error "not found") +echo "Python:" $(command -v python || error "not found") +echo "uv:" $(command -v uv || error "not found") +echo "pipx:" $(command -v pipx || error "not found") +echo "nodejs:": $(command -v node || error "not found") +echo "pnpm:" $(command -v pnpm || error "not found") +echo "mise:" $(command -v mise || error "not found") + +echo "llm:" $(command -v llm || error "not found")