diff --git a/scripts/start.sh b/scripts/start.sh index 2631e54..5b7f8b9 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -893,8 +893,7 @@ EOF } done #测试自定义配置文件 - error=$("$TMPDIR"/CrashCore check -D "$BINDIR" -C "$TMPDIR"/jsons 2>&1) - if [ -n "$error" ]; then + if ! error=$("$TMPDIR"/CrashCore check -D "$BINDIR" -C "$TMPDIR"/jsons 2>&1); then echo $error error_file=$(echo $error | grep -Eo 'cust.*\.json' | sed 's/cust_//g') [ "$error_file" = 'add_rules.json' ] && error_file="$CRASHDIR"/yamls/rules.yaml自定义规则 || error_file="$CRASHDIR"/jsons/$error_file