Fixed a bug in the PowerShell script
This commit is contained in:
@@ -18,12 +18,23 @@ param(
|
|||||||
|
|
||||||
# Defaults to a .env file next to the repo root (one level up from this script),
|
# Defaults to a .env file next to the repo root (one level up from this script),
|
||||||
# matching where the Python version expects it.
|
# matching where the Python version expects it.
|
||||||
[string]$EnvFile = (Join-Path $PSScriptRoot "..\.env")
|
[string]$EnvFile
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$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 {
|
function Import-DotEnv {
|
||||||
param([string]$Path)
|
param([string]$Path)
|
||||||
|
|||||||
Reference in New Issue
Block a user