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) {
|
if (-not $WhatIf) {
|
||||||
Set-Content -LiteralPath $sshConfigPath -Value $configText.TrimEnd() -Encoding UTF8 -NoNewline
|
$utf8NoBom = New-Object System.Text.UTF8Encoding $false
|
||||||
Add-Content -LiteralPath $sshConfigPath -Value '' -Encoding UTF8
|
[System.IO.File]::WriteAllText($sshConfigPath, $configText.TrimEnd() + "`n", $utf8NoBom)
|
||||||
|
|
||||||
Get-Service ssh-agent -ErrorAction SilentlyContinue | Where-Object { $_.Status -ne 'Running' } |
|
Get-Service ssh-agent -ErrorAction SilentlyContinue | Where-Object { $_.Status -ne 'Running' } |
|
||||||
ForEach-Object { Start-Service ssh-agent -ErrorAction SilentlyContinue | Out-Null }
|
ForEach-Object { Start-Service ssh-agent -ErrorAction SilentlyContinue | Out-Null }
|
||||||
|
|||||||
Reference in New Issue
Block a user