chore(tools): 2b 注入 proof 路径随仓库位置推导,缺失参数报错文案改正
proof 脚本原先硬编码 D 盘绝对路径,换机器就失效;仓库内已有同约定 (build-android.ps1 用 \ 推导),此处对齐。 text_check 的报错文案说「为空」,实际触发条件是 --units 缺失,改正。
This commit is contained in:
parent
79e3e77c97
commit
a93430dd3f
@ -21,7 +21,9 @@
|
||||
# a stray injection would land in whatever window was foreground.
|
||||
|
||||
$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"
|
||||
$base = "D:\working\environment"
|
||||
|
||||
|
||||
@ -33,7 +33,10 @@ fn arg(name: &str) -> Option<String> {
|
||||
|
||||
fn parse_units(spec: &str) -> Result<Vec<u16>> {
|
||||
if spec.trim().is_empty() {
|
||||
bail!("--units 为空:本轮要验证的是「有文本送出并被注入」,空输入没有验证价值");
|
||||
bail!(
|
||||
"--units 缺失或为空:本工具要验证的是「有文本送出并被注入」,\
|
||||
空输入没有验证价值(空 Text 在产品路径上由 Session::send_text 拦掉)"
|
||||
);
|
||||
}
|
||||
spec.split(',')
|
||||
.map(|s| s.trim())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user