This commit is contained in:
2025-12-03 21:31:30 +08:00
parent 3996c4fc2f
commit e5fa9429ae
6 changed files with 1481 additions and 12 deletions

View File

@@ -31,9 +31,16 @@ update_and_build() {
echo "代码更新完成"
fi
# 确保 Go 在 PATH 中systemd 可能没有设置 PATH
if [ -d "/usr/local/go/bin" ] && ! echo "$PATH" | grep -q "/usr/local/go/bin"; then
export PATH="/usr/local/go/bin:$PATH"
fi
# 检查 Go 环境
if ! command -v go > /dev/null 2>&1; then
echo "错误: 未找到 Go 环境,无法编译" >&2
echo "PATH: $PATH" >&2
echo "请确保 Go 已安装: /usr/local/go/bin 或系统 PATH 中包含 go 命令" >&2
exit 1
fi