fix(perception): support worker powershell runtime

This commit is contained in:
DCCONSTRUCTIONS
2026-08-05 15:56:19 +03:00
parent 40794f13aa
commit b38cd51338
+8 -1
View File
@@ -114,10 +114,17 @@ function Write-Utf8NoBom([string]$Path, [string]$Value) {
}
function Get-DirectoryTreeSha256([string]$Root, [object[]]$Files) {
$rootPrefix = $Root.TrimEnd("\") + "\"
$rows = @(
foreach ($file in $Files) {
if (-not $file.FullName.StartsWith(
$rootPrefix,
[StringComparison]::OrdinalIgnoreCase
)) {
throw "M4 dependency file escaped its declared root"
}
[pscustomobject]@{
Relative = [IO.Path]::GetRelativePath($Root, $file.FullName).Replace("\", "/")
Relative = $file.FullName.Substring($rootPrefix.Length).Replace("\", "/")
File = $file
}
}