param( [switch]$SkipHealthCheck ) $ErrorActionPreference = "Stop" $RepoRoot = Split-Path -Parent $MyInvocation.MyCommand.Path $DelegateScript = Join-Path $RepoRoot "scripts\deploy_to_nas.ps1" if (-not (Test-Path -LiteralPath $DelegateScript)) { throw "Deploy script not found: $DelegateScript" } $arguments = @( "-ExecutionPolicy", "Bypass", "-File", $DelegateScript ) if ($SkipHealthCheck) { $arguments += "-SkipHealthCheck" } powershell @arguments exit $LASTEXITCODE