Fixed Encoding Issue with Server URL

This commit is contained in:
2025-09-27 22:51:46 -06:00
parent 71a0d153cf
commit 3c0f283c25
2 changed files with 32 additions and 13 deletions

View File

@@ -503,7 +503,10 @@ function InstallOrUpdate-BorealisAgent {
if (-not $inputUrl) { $inputUrl = $currentUrl }
$inputUrl = $inputUrl.Trim()
if (-not $inputUrl) { $inputUrl = $defaultUrl }
$inputUrl | Out-File -FilePath $serverUrlPath -Encoding utf8 -Force
# Write UTF-8 without BOM to avoid BOM being read into the URL
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllText($serverUrlPath, $inputUrl, $utf8NoBom)
}
Write-Host "`nConfiguring Borealis Agent (tasks)..." -ForegroundColor Blue