mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-10-25 14:00:53 +00:00
abc00b8804
Bind guest WebSocket sessions to a single target peer, enforce grant lifecycle and atomic usage, add the guest issuer scope, and document the password-less security boundary.\n\nRefs #440\n\nThanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
43 lines
1.1 KiB
PowerShell
43 lines
1.1 KiB
PowerShell
param(
|
|
[string[]]$Path = @(
|
|
"betterdesk.ps1",
|
|
"build-betterdesk.ps1",
|
|
"scripts/check-powershell-syntax.ps1",
|
|
"scripts/check-wiki-staleness.ps1",
|
|
"scripts/local-gate.ps1",
|
|
"scripts/setup-local-gates.ps1",
|
|
"scripts/sync-wiki.ps1"
|
|
)
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$failures = @()
|
|
|
|
foreach ($file in $Path) {
|
|
$resolved = Join-Path (Split-Path -Parent $PSScriptRoot) $file
|
|
if (-not (Test-Path -LiteralPath $resolved -PathType Leaf)) {
|
|
$failures += "$file is missing"
|
|
continue
|
|
}
|
|
|
|
$tokens = $null
|
|
$errors = $null
|
|
[System.Management.Automation.Language.Parser]::ParseFile(
|
|
(Resolve-Path -LiteralPath $resolved),
|
|
[ref]$tokens,
|
|
[ref]$errors
|
|
) | Out-Null
|
|
|
|
if ($errors.Count -gt 0) {
|
|
$messages = $errors | ForEach-Object { $_.Message }
|
|
$failures += "$file failed to parse: $($messages -join '; ')"
|
|
}
|
|
}
|
|
|
|
if ($failures.Count -gt 0) {
|
|
$failures | ForEach-Object { Write-Error $_ }
|
|
exit 1
|
|
}
|
|
|
|
Write-Output "PowerShell installer syntax checks passed."
|