From e313086d9b432af2816f62c7bb1ee1ce59f356a4 Mon Sep 17 00:00:00 2001 From: Peanut Date: Sun, 19 Jul 2026 13:25:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20Windows=20=E5=B9=B3=E5=8F=B0=20c?= =?UTF-8?q?url=20=E9=AA=8C=E8=AF=81=E4=BD=BF=E7=94=A8=20NUL=20=E6=9B=BF?= =?UTF-8?q?=E4=BB=A3=20/dev/null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows cmd.exe 不支持 /dev/null(那是 Unix 概念), 导致 curl 写入失败返回 exit code 23,验证误报为'访问异常'。 改为根据 sys.platform 动态选择 null 设备。 --- deploy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy.py b/deploy.py index e588030..1995a25 100644 --- a/deploy.py +++ b/deploy.py @@ -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: