mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 04:22:06 +08:00
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
This commit is contained in:
parent
d86701fd94
commit
a8933b848d
@ -277,17 +277,17 @@ modify_cursor_app_files() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 验证文件内容是否包含必要的代码
|
# # 验证文件内容是否包含必要的代码
|
||||||
log_debug "正在验证文件内容..."
|
# log_debug "正在验证文件内容..."
|
||||||
if ! grep -q "crypto\s*\.\s*randomUUID\s*(" "$temp_file"; then
|
# if ! grep -q "crypto\s*\.\s*randomUUID\s*(" "$temp_file"; then
|
||||||
log_debug "文件内容预览:"
|
# log_debug "文件内容预览:"
|
||||||
head -n 20 "$temp_file" | log_debug
|
# head -n 20 "$temp_file" | log_debug
|
||||||
log_error "修改后的文件缺少必要的代码: $file"
|
# log_error "修改后的文件缺少必要的代码: $file"
|
||||||
rm -f "$temp_file"
|
# rm -f "$temp_file"
|
||||||
continue
|
# continue
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
log_debug "文件验证通过"
|
#log_debug "文件验证通过"
|
||||||
|
|
||||||
# 替换原文件
|
# 替换原文件
|
||||||
if ! mv "$temp_file" "$file"; then
|
if ! mv "$temp_file" "$file"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user