File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ Param(
53
53
[switch ]$Compile
54
54
)
55
55
56
+ # Get the scripts and cmder root dirs we are building in.
57
+ $ScriptRoot = Split-Path - Parent - Path $MyInvocation.MyCommand.Definition
58
+ $cmder_root = $ScriptRoot.replace (" \scripts" , " " )
59
+
56
60
# Dot source util functions into this scope
57
61
. " .\utils.ps1"
58
62
$ErrorActionPreference = " Stop"
@@ -75,6 +79,14 @@ if ($config -ne "") {
75
79
} else { $ConEmuXml = " " }
76
80
} else { $ConEmuXml = " " }
77
81
82
+ # Kill ssh-agent.exe if it is running from the $env:cmder_root we are building
83
+ foreach ($ssh_agent in $ (get-process ssh- agent - erroraction silentlycontinue)) {
84
+ if ([string ]$ ($ssh_agent.path ) -match [string ]$cmder_root.replace (' \' , ' \\' )) {
85
+ write-verbose $ (" Stopping " + $ssh_agent.path + " !" )
86
+ stop-process $ssh_agent.id
87
+ }
88
+ }
89
+
78
90
$vend = $pwd
79
91
foreach ($s in $sources ) {
80
92
Write-Verbose " Getting $ ( $s.name ) from URL $ ( $s.url ) "
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ function Delete-Existing ($path) {
28
28
}
29
29
30
30
function Extract-Archive ($source , $target ) {
31
+ Write-Verbose $ (" Extracting Archive '$cmder_root \vendor\" + $source.replace (' /' , ' \' ) + " to '$cmder_root \vendor\$target '" )
31
32
Invoke-Expression " 7z x -y -o`" $ ( $target ) `" `" $source `" > `$ null"
32
33
if ($lastexitcode -ne 0 ) {
33
34
Write-Error " Extracting of $source failied"
You can’t perform that action at this time.
0 commit comments