diff --git a/scripts/build.ps1 b/scripts/build.ps1 index e317bee..c0048bb 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -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)..." diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 4cfb477..21c86bc 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -92,7 +92,7 @@ function Get-GHTempPath { return $temp } -function Get-VersionStr() { +function Get-VersionStr { # Clear existing variable if ($string) { Clear-Variable -name string }