Files
calendar-scheduling-OPEN/scripts/start-local.ps1
2026-10-06 14:47:01 -06:00

11 lines
623 B
PowerShell

[CmdletBinding()]
param([string]$DatabasePath)
$ErrorActionPreference = "Stop"
$projectRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
if (-not $DatabasePath) { $DatabasePath = Join-Path $projectRoot "state\scheduling-ledger.sqlite3" }
$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"
$env:SCHEDULING_DB = $DatabasePath
try { & $pythonCommand.Source -m scheduling_core.api } finally { Remove-Item Env:\PYTHONPATH,Env:\SCHEDULING_DB -ErrorAction SilentlyContinue }