Skip to content

Commit

Permalink
Fix issue when env file is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
rajbos authored Sep 5, 2023
1 parent 155c9b8 commit c83a54a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Src/PowerShell/entrypoint.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ function Get-LocationInfo {

function Import-EnvironmentVariables {
# load the environment variables from the .env file in the root of the repo:
# checik if the file exists :
# "../../.env"
if ($false -eq (Test-Path "../../.env")) {
Write-Debug "No .env file found in the root of the repo"
return
}

Get-Content "../../.env" | ForEach-Object {
$name, $value = $_.split('=')
# if name already exists, do not overwrite it:
Expand Down

0 comments on commit c83a54a

Please sign in to comment.