Private
Public Access
1
0

fix: 修复包管理器检测,info 输出到 stderr

This commit is contained in:
2025-12-12 11:04:55 +08:00
parent b068678cf3
commit 36a96d4551

View File

@@ -71,14 +71,14 @@ command_exists() {
get_package_manager() { get_package_manager() {
if command_exists node; then if command_exists node; then
local node_version=$(node --version 2>/dev/null | sed 's/v//') local node_version=$(node --version 2>/dev/null | sed 's/v//')
info "检测到 Node.js v$node_version" info "检测到 Node.js v$node_version" >&2
echo "npm" echo "npm"
return 0 return 0
fi fi
if command_exists bun; then if command_exists bun; then
local bun_version=$(bun --version 2>/dev/null) local bun_version=$(bun --version 2>/dev/null)
info "检测到 Bun v$bun_version" info "检测到 Bun v$bun_version" >&2
echo "bun" echo "bun"
return 0 return 0
fi fi