fix: harden Windows trans helpers
Resolve #1691 by preserving argv boundaries, adding bounded native rg and wc/skill query support, surfacing WSL-to-Windows hints, and splitting the oversized SSH module and embedded remote scripts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
if ($operation -eq 'stat') {
|
||||
if ($toolArgs.Count -eq 0) { Fail 'stat requires at least one path on Windows routes' 2 }
|
||||
[Console]::Out.WriteLine('TYPE BYTES SHA256 PATH')
|
||||
foreach ($raw in $toolArgs) {
|
||||
$path = Resolve-UnideskPath $raw
|
||||
if (-not (Test-Path -LiteralPath $path)) { Fail ('path not found: ' + $path) 1 }
|
||||
$item = Get-Item -LiteralPath $path
|
||||
if ($item.PSIsContainer) { [Console]::Out.WriteLine('dir - - ' + $path) } else { [Console]::Out.WriteLine('file ' + $item.Length + ' ' + (Get-Sha256 $path) + ' ' + $path) }
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
Reference in New Issue
Block a user