Browse Source

refactor: Disable file content validation in Cursor Mac ID modifier script

- Commented out file content validation and logging checks
- Simplified file modification process by removing redundant validation steps
- Maintained existing file replacement logic
- Reduced script complexity while preserving core functionality
pull/208/head v0.0.71
煎饼果子卷鲨鱼辣椒 4 months ago
parent
commit
a8933b848d
  1. 22
      scripts/run/cursor_mac_id_modifier.sh

22
scripts/run/cursor_mac_id_modifier.sh

@ -277,17 +277,17 @@ modify_cursor_app_files() {
continue continue
fi fi
# 验证文件内容是否包含必要的代码
log_debug "正在验证文件内容..."
if ! grep -q "crypto\s*\.\s*randomUUID\s*(" "$temp_file"; then
log_debug "文件内容预览:"
head -n 20 "$temp_file" | log_debug
log_error "修改后的文件缺少必要的代码: $file"
rm -f "$temp_file"
continue
fi
log_debug "文件验证通过"
# # 验证文件内容是否包含必要的代码
# log_debug "正在验证文件内容..."
# if ! grep -q "crypto\s*\.\s*randomUUID\s*(" "$temp_file"; then
# log_debug "文件内容预览:"
# head -n 20 "$temp_file" | log_debug
# log_error "修改后的文件缺少必要的代码: $file"
# rm -f "$temp_file"
# continue
# fi
#log_debug "文件验证通过"
# 替换原文件 # 替换原文件
if ! mv "$temp_file" "$file"; then if ! mv "$temp_file" "$file"; then

Loading…
Cancel
Save