Setup-GitSsh: писать ssh config без UTF-8 BOM.
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user