Fixed a bug in the PowerShell script

This commit is contained in:
2026-07-10 12:28:58 -04:00
parent 5a0f64d2e9
commit 8b2afe12e0
+13 -2
View File
@@ -18,12 +18,23 @@ param(
# Defaults to a .env file next to the repo root (one level up from this script),
# matching where the Python version expects it.
[string]$EnvFile = (Join-Path $PSScriptRoot "..\.env")
[string]$EnvFile
)
$ErrorActionPreference = "Stop"
. (Join-Path $PSScriptRoot "PolarisClient.ps1")
# $PSScriptRoot isn't always populated (e.g. PowerShell 2.0, or the script being
# dot-sourced/pasted rather than run via -File), so fall back to $MyInvocation.
$ScriptRoot = $PSScriptRoot
if (-not $ScriptRoot) {
$ScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
}
if (-not $EnvFile) {
$EnvFile = Join-Path $ScriptRoot "..\.env"
}
. (Join-Path $ScriptRoot "PolarisClient.ps1")
function Import-DotEnv {
param([string]$Path)