fix(deploy): Windows 平台 curl 验证使用 NUL 替代 /dev/null

Windows cmd.exe 不支持 /dev/null(那是 Unix 概念),
导致 curl 写入失败返回 exit code 23,验证误报为'访问异常'。
改为根据 sys.platform 动态选择 null 设备。
This commit is contained in:
2026-07-19 13:25:01 +08:00
parent 1b566d574c
commit e313086d9b
+2 -1
View File
@@ -524,8 +524,9 @@ def verify_deploy():
]
for url, label in endpoints:
null_device = 'NUL' if sys.platform == 'win32' else '/dev/null'
ok, stdout, _ = run_command(
f'curl -k -s -o /dev/null -w "HTTP %{{http_code}}" {url}',
f'curl -k -s -o {null_device} -w "HTTP %{{http_code}}" {url}',
timeout=30
)
if ok and stdout: