powershell formatting

This commit is contained in:
David Refoua
2022-11-04 18:47:16 +03:30
parent 3859f6ffc0
commit efb3338f5c
3 changed files with 13 additions and 11 deletions

View File

@ -35,7 +35,7 @@
.LINK
http://cmder.app/ - Project Home
#>
[CmdletBinding(SupportsShouldProcess=$true)]
[CmdletBinding(SupportsShouldProcess = $true)]
Param(
# CmdletBinding will give us;
# -verbose switch to turn on logging and
@ -108,12 +108,14 @@ if (-Not $noVendor) {
$ConEmuXmlSave = Join-Path $config "ConEmu.xml"
Write-Verbose "Backup '$ConEmuXml' to '$ConEmuXmlSave'"
Copy-Item $ConEmuXml $ConEmuXmlSave
} else { $ConEmuXml = "" }
} else { $ConEmuXml = "" }
}
else { $ConEmuXml = "" }
}
else { $ConEmuXml = "" }
# Kill ssh-agent.exe if it is running from the $env:cmder_root we are building
foreach ($ssh_agent in $(Get-Process ssh-agent -ErrorAction SilentlyContinue)) {
if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\','\\')) {
if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\', '\\')) {
Write-Verbose $("Stopping " + $ssh_agent.path + "!")
Stop-Process $ssh_agent.id
}