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:
parent
09aa1ee35d
commit
03234032e0
|
|
@ -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配置并返回错误信息
|
||||
|
|
|
|||
Loading…
Reference in New Issue