mirror of
https://github.com/cmderdev/cmder.git
synced 2025-01-10 16:29:08 +08:00
stop ssh agent only if building vendors
This commit is contained in:
parent
7995f34981
commit
71536ddddf
@ -53,7 +53,7 @@ Param(
|
||||
# Config folder location
|
||||
[string]$config = "$PSScriptRoot\..\config",
|
||||
|
||||
# Using this option will skip all downloads and only build launcher
|
||||
# Using this option will skip all downloads, if you only need to build launcher
|
||||
[switch]$noVendor,
|
||||
|
||||
# Build launcher if you have MSBuild tools installed
|
||||
@ -67,14 +67,6 @@ $cmder_root = Resolve-Path "$PSScriptRoot\.."
|
||||
. "$PSScriptRoot\utils.ps1"
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# 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('\','\\')) {
|
||||
Write-Verbose $("Stopping " + $ssh_agent.path + "!")
|
||||
Stop-Process $ssh_agent.id
|
||||
}
|
||||
}
|
||||
|
||||
if ($Compile) {
|
||||
# Check for requirements
|
||||
Ensure-Executable "msbuild"
|
||||
@ -119,6 +111,14 @@ if (-Not $noVendor) {
|
||||
} 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('\','\\')) {
|
||||
Write-Verbose $("Stopping " + $ssh_agent.path + "!")
|
||||
Stop-Process $ssh_agent.id
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($s in $sources) {
|
||||
Write-Verbose "Getting vendored $($s.name) $($s.version)..."
|
||||
|
||||
|
@ -92,7 +92,7 @@ function Get-GHTempPath {
|
||||
return $temp
|
||||
}
|
||||
|
||||
function Get-VersionStr() {
|
||||
function Get-VersionStr {
|
||||
# Clear existing variable
|
||||
if ($string) { Clear-Variable -name string }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user