fix: 移除多余trailing echo,修正blank line清理sed模式

Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/d77eb92f-55c9-4cb8-92db-2c4ce8754a8a

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-05 18:31:34 +00:00 committed by GitHub
parent 09aa1ee35d
commit 03234032e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -543,8 +543,8 @@ remove_v3_nginx_blocks() {
local conf="$1"
# 删除从V3注释行到该location块闭合}的所有内容
sed -i '/# ─── 光湖语言世界V3/,/^[[:space:]]*}/d' "$conf"
# 清理多余空行
sed -i '/^$/N;/^\n$/d' "$conf"
# 清理连续空行(保留最多一个空行)
sed -i '/^$/N;/^\n$/D' "$conf"
}
# 验证nginx配置并返回错误信息