chore(tools): 2b 注入 proof 路径随仓库位置推导,缺失参数报错文案改正

proof 脚本原先硬编码 D 盘绝对路径,换机器就失效;仓库内已有同约定
(build-android.ps1 用 \ 推导),此处对齐。
text_check 的报错文案说「为空」,实际触发条件是 --units 缺失,改正。
This commit is contained in:
郑博文 2026-10-30 12:21:19 +08:00
parent 79e3e77c97
commit a93430dd3f
2 changed files with 7 additions and 2 deletions

View File

@ -21,7 +21,9 @@
# a stray injection would land in whatever window was foreground. # a stray injection would land in whatever window was foreground.
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
$repo = "D:\working\projects\yuankong\remote" # Repo root derived from this script's location (tools/ is one level under the
# repo root) so the proof runs on any clone, not just the author's D: drive.
$repo = (Resolve-Path "$PSScriptRoot\..").Path
$tmp = "$env:TEMP\remote-text-proof" $tmp = "$env:TEMP\remote-text-proof"
$base = "D:\working\environment" $base = "D:\working\environment"

View File

@ -33,7 +33,10 @@ fn arg(name: &str) -> Option<String> {
fn parse_units(spec: &str) -> Result<Vec<u16>> { fn parse_units(spec: &str) -> Result<Vec<u16>> {
if spec.trim().is_empty() { if spec.trim().is_empty() {
bail!("--units 为空:本轮要验证的是「有文本送出并被注入」,空输入没有验证价值"); bail!(
"--units 缺失或为空:本工具要验证的是「有文本送出并被注入」,\
空输入没有验证价值(空 Text 在产品路径上由 Session::send_text 拦掉)"
);
} }
spec.split(',') spec.split(',')
.map(|s| s.trim()) .map(|s| s.trim())