修复发布路径检查的空环境变量参数错误

This commit is contained in:
xuans 2026-09-20 20:54:07 +08:00
parent 1fbd26e031
commit e25e840930
2 changed files with 4 additions and 1 deletions

View File

@ -143,6 +143,8 @@ func TestReleaseScriptUsesPathChecksAndIncludesLinuxHelper(t *testing.T) {
}
for _, required := range []string{
"go build -trimpath", "wails build -trimpath", "Test-ReleasePaths -Source $targetDirectory",
`$checkedPaths = @($forbiddenPaths | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique)`,
`-ForbiddenPaths $checkedPaths`,
`-Package "./cmd/scert-nginx"`, `$binaries += "scert-nginx"`,
`-Executable (@("install-linux.sh") + $binaries)`,
`trimpath = $true`, `local_path_check = "passed"`,

View File

@ -425,7 +425,8 @@ try {
}
}
Test-ReleasePaths -Source $targetDirectory -Binaries $binaries -ForbiddenPaths $forbiddenPaths
$checkedPaths = @($forbiddenPaths | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique)
Test-ReleasePaths -Source $targetDirectory -Binaries $binaries -ForbiddenPaths $checkedPaths
Write-TargetChecksums -TargetDirectory $targetDirectory | Out-Null
foreach ($file in (Get-ChildItem -LiteralPath $targetDirectory -Recurse -File | Sort-Object FullName)) {
$hash = Get-FileHash -LiteralPath $file.FullName -Algorithm SHA256