chore: adjust minial build files

This commit is contained in:
engigu
2026-03-16 09:57:11 +08:00
parent 7557f66790
commit f1c5be714e
6 changed files with 215 additions and 10 deletions
+5 -7
View File
@@ -41,10 +41,8 @@ export MISE_DATA_DIR="$MISE_DIR"
export MISE_CONFIG_DIR="$MISE_DIR"
export PATH="$MISE_DIR/shims:$MISE_DIR/bin:$PATH"
# 使 Node.js 运行脚本时能够自动找到全局安装的模块 (仅当 npm 存在时执行)
if command -v npm >/dev/null 2>&1; then
export NODE_PATH=$(npm root -g 2>/dev/null)
fi
# 使 Node.js 运行脚本时能够自动找到全局安装的模块 (类似 Python site-packages 行为)
export NODE_PATH=$(npm root -g 2>/dev/null)
# 默认启用 Python 镜像源
export PIP_INDEX_URL=${PIP_INDEX_URL:-https://pypi.org/simple}
@@ -57,9 +55,9 @@ export PYTHONPATH=/app/data/scripts:$PYTHONPATH
# 打印确认
# ============================
log "mise version: $(mise --version 2>/dev/null | head -n 1)"
[ -x "$(command -v python)" ] && log "python: $(python --version 2>&1 | head -n 1) at $(which python)" || log "python: not installed"
[ -x "$(command -v node)" ] && log "node: $(node --version 2>&1 | head -n 1) at $(which node)" || log "node: not installed"
[ -x "$(command -v npm)" ] && log "npm: $(npm --version 2>&1 | head -n 1) at $(which npm)" || log "npm: not installed"
log "python: $(python --version 2>&1 | head -n 1) at $(which python)"
log "node: $(node --version 2>&1 | head -n 1) at $(which node)"
log "npm: $(npm --version 2>&1 | head -n 1) at $(which npm)"
# ============================
# 将 baihu 注册到全局命令