diff --git a/tools/text_injection_proof.ps1 b/tools/text_injection_proof.ps1 index dc17ff6..5bc51df 100644 --- a/tools/text_injection_proof.ps1 +++ b/tools/text_injection_proof.ps1 @@ -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" diff --git a/viewer-core/examples/text_check.rs b/viewer-core/examples/text_check.rs index 10dfffb..ac35080 100644 --- a/viewer-core/examples/text_check.rs +++ b/viewer-core/examples/text_check.rs @@ -33,7 +33,10 @@ fn arg(name: &str) -> Option { fn parse_units(spec: &str) -> Result> { if spec.trim().is_empty() { - bail!("--units 为空:本轮要验证的是「有文本送出并被注入」,空输入没有验证价值"); + bail!( + "--units 缺失或为空:本工具要验证的是「有文本送出并被注入」,\ + 空输入没有验证价值(空 Text 在产品路径上由 Session::send_text 拦掉)" + ); } spec.split(',') .map(|s| s.trim())