fix: 修复包管理器检测,info 输出到 stderr
This commit is contained in:
4
setup.sh
4
setup.sh
@@ -71,14 +71,14 @@ command_exists() {
|
||||
get_package_manager() {
|
||||
if command_exists node; then
|
||||
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"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if command_exists bun; then
|
||||
local bun_version=$(bun --version 2>/dev/null)
|
||||
info "检测到 Bun v$bun_version"
|
||||
info "检测到 Bun v$bun_version" >&2
|
||||
echo "bun"
|
||||
return 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user