9 lines
636 B
PowerShell
9 lines
636 B
PowerShell
[CmdletBinding()]
|
|||
|
|
param()
|
||
|
|
$ErrorActionPreference = "Stop"
|
||
|
|
if ([string]::IsNullOrWhiteSpace($env:POSTMARK_SERVER_TOKEN)) { throw "Set POSTMARK_SERVER_TOKEN using your approved secret manager." }
|
||
|
|
$projectRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
||
|
|
$pythonCommand = Get-Command python -ErrorAction SilentlyContinue
|
||
|
|
if (-not $pythonCommand) { throw "Python 3.11 or newer must be available on PATH." }
|
||
|
|
$env:PYTHONPATH = Join-Path $projectRoot "src"
|
||
|
|
try { & $pythonCommand.Source (Join-Path $PSScriptRoot "verify_postmark_readonly.py"); exit $LASTEXITCODE } finally { Remove-Item Env:\PYTHONPATH -ErrorAction SilentlyContinue }
|