$ErrorActionPreference = "Stop"

$EnvName = "ndc_1c_mvp"
$EnvPython = Join-Path $env:USERPROFILE "miniconda3\envs\$EnvName\python.exe"
if (-not (Test-Path $EnvPython)) {
  $EnvPython = Join-Path $env:USERPROFILE "Miniconda3\envs\$EnvName\python.exe"
}
if (-not (Test-Path $EnvPython)) {
  throw "Python for env '$EnvName' not found. Expected: $EnvPython"
}

& $EnvPython scripts/foxylink_probe_endpoint.py @args
