Skip to content

Commit

Permalink
Avoid setenv on blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
weikanglim committed May 17, 2023
1 parent 21746d4 commit 0e23f4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/prepdocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Write-Host ""
$output = azd env get-values

foreach ($line in $output) {
if (!$line.Contains('=')) {
continue
}

$name, $value = $line.Split("=")
$value = $value -replace '^\"|\"$'
[Environment]::SetEnvironmentVariable($name, $value)
Expand Down

0 comments on commit 0e23f4f

Please sign in to comment.