- 在 commands 中添加 export HUSKY=0 确保 husky 被禁用 - 修复 MESSAGE_ESCAPED 处理逻辑,避免 shell 解析错误 - 将换行符替换为空格,而不是 \n 字符串
This commit is contained in:
+3
-2
@@ -91,6 +91,7 @@ steps:
|
||||
NODE_ENV: production
|
||||
HUSKY: 0
|
||||
commands:
|
||||
- export HUSKY=0
|
||||
- npm ci --omit=dev
|
||||
- npm audit --audit-level=high --omit=dev
|
||||
when:
|
||||
@@ -438,8 +439,8 @@ steps:
|
||||
|
||||
TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
|
||||
# 转义特殊字符
|
||||
MESSAGE_ESCAPED=$(echo "$MESSAGE" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | tr '\n' '\\n')
|
||||
# 转义特殊字符(简化处理)
|
||||
MESSAGE_ESCAPED=$(echo "$MESSAGE" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | tr '\n' ' ')
|
||||
|
||||
curl -X POST "$WECHAT_WEBHOOK" \
|
||||
-H 'Content-Type: application/json' \
|
||||
|
||||
Reference in New Issue
Block a user