Files
calendar-scheduling-OPEN/scripts/record-authorized-postmark-test-delivery.ps1
2026-10-06 14:47:01 -06:00

10 lines
650 B
PowerShell

[CmdletBinding()]
param()
$ErrorActionPreference = "Stop"
if ([string]::IsNullOrWhiteSpace($env:SCHEDULING_TEST_DATABASE)) { throw "Set SCHEDULING_TEST_DATABASE to an isolated test ledger." }
$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 "record_authorized_postmark_test_delivery.py"); exit $LASTEXITCODE } finally { Remove-Item Env:\PYTHONPATH -ErrorAction SilentlyContinue }