From e1078dc6ed648258a51993a157a976f524f4694b Mon Sep 17 00:00:00 2001 From: PTah Date: Thu, 18 Jun 2026 11:34:18 +1000 Subject: [PATCH] =?UTF-8?q?Setup-GitSsh:=20=D0=BF=D0=B8=D1=81=D0=B0=D1=82?= =?UTF-8?q?=D1=8C=20ssh=20config=20=D0=B1=D0=B5=D0=B7=20UTF-8=20BOM.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/Setup-GitSsh.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Setup-GitSsh.ps1 b/scripts/Setup-GitSsh.ps1 index 1f6b650..914361e 100644 --- a/scripts/Setup-GitSsh.ps1 +++ b/scripts/Setup-GitSsh.ps1 @@ -175,8 +175,8 @@ foreach ($hostAlias in ($parsed.Hosts.Keys | Sort-Object)) { } if (-not $WhatIf) { - Set-Content -LiteralPath $sshConfigPath -Value $configText.TrimEnd() -Encoding UTF8 -NoNewline - Add-Content -LiteralPath $sshConfigPath -Value '' -Encoding UTF8 + $utf8NoBom = New-Object System.Text.UTF8Encoding $false + [System.IO.File]::WriteAllText($sshConfigPath, $configText.TrimEnd() + "`n", $utf8NoBom) Get-Service ssh-agent -ErrorAction SilentlyContinue | Where-Object { $_.Status -ne 'Running' } | ForEach-Object { Start-Service ssh-agent -ErrorAction SilentlyContinue | Out-Null }