Containers/Get-VSCodeExtensionFromContainer.ps1
function Get-VSCodeExtensionFromContainer { Param( [Parameter(Mandatory=$false)] [string]$ContainerName = (Get-ContainerFromLaunchJson) ) $Logs = docker logs $ContainerName $VsixUrl = $Logs.item($Logs.indexOf('Files:') + 1) $VsixName = (Split-Path $VsixUrl -Leaf).TrimEnd('.vsix') $VsixPath = Join-Path (Split-Path (Get-TFSConfigPath) -Parent) $VsixName $VsixFile = (Join-Path -Path $VsixPath -ChildPath $VsixName) + '.vsix' if (!(Test-Path $VsixPath)){ New-Item -Path $VsixPath -ItemType Directory Download-File -sourceUrl $VsixUrl -destinationFile $VsixFile } $VsixFile } Export-ModuleMember -Function Get-VSCodeExtensionFromContainer |