Skip to content

Commit

Permalink
Update install.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Mar 22, 2022
1 parent 6469813 commit f7d7b13
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1273,26 +1273,19 @@ function test_running_process($app, $global) {
function Test-IsInsideContainer {
$foundService = Get-Service -Name cexecsvc -ErrorAction SilentlyContinue
if ( $foundService -eq $null ) {
Write-Host "Test-IsInsideContainer Result = false"
$false
}
else {
Write-Host "Test-IsInsideContainer Result = true"
$true
}
}

# wrapper function to create junction links
# Required to handle docker/for-win#12240
function New-DirectoryJunction($source, $target) {
Write-Host "Linking.. $source "
Write-Host "to"
Write-Host "taget = $target"
if (Test-IsInsideContainer) {
Write-Host "Calling mklink $env:COMSPEC /C mklink /J $source $target"
& "$env:COMSPEC" /c "mklink /j `"$source`" `"$target`"" | out-null
} else {
Write-Host "Calling New-Item"
New-Item -Path $source -ItemType Junction -Value $target | Out-Null
}
attrib $source +R /L
Expand Down

0 comments on commit f7d7b13

Please sign in to comment.