Skip to content

Commit b095028

Browse files
committed
refactor: Simplify Mac system UUID modification process
- Removed user confirmation prompt for UUID modification - Automatically update system UUID without additional user interaction - Added clear console output to inform user about UUID change and restart requirement
1 parent 3d61fa9 commit b095028

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

scripts/run/cursor_mac_id_modifier.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,10 @@ generate_new_config() {
175175
# 生成新的系统 UUID
176176
local new_system_uuid=$(uuidgen)
177177

178-
# 尝试修改系统 UUID (需要用户确认)
179-
echo # 添加空行使提示更清晰
180-
printf "${YELLOW}注意:修改系统 UUID 需要重启系统才能生效${NC}\n"
181-
printf "${YELLOW}是否要修改系统 UUID?(y/N)${NC} " # 使用 printf 并在末尾加空格
182-
read -r choice
183-
if [[ "$choice" =~ ^[Yy]$ ]]; then
184-
sudo nvram SystemUUID="$new_system_uuid"
185-
log_info "系统 UUID 已更新,请重启系统以应用更改"
186-
else
187-
log_info "跳过系统 UUID 修改"
188-
fi
178+
# 修改系统 UUID
179+
sudo nvram SystemUUID="$new_system_uuid"
180+
printf "${YELLOW}系统 UUID 已更新为: $new_system_uuid${NC}\n"
181+
printf "${YELLOW}请重启系统以使更改生效${NC}\n"
189182

190183
# 将 auth0|user_ 转换为字节数组的十六进制
191184
local prefix_hex=$(echo -n "auth0|user_" | xxd -p)

0 commit comments

Comments
 (0)