Containers/Get-CompilerFromContainer.ps1

<#
 .Synopsis
  Downloads and extracts the compiler from the container
 .Description
  Downloads and extracts the compiler from the container and returns the path to the contents
 .Parameter ContainerName
  Name of the container. Can be provided in the settings.json
 .Example
  $path = Get-CompilerFromContainer
#>

function Get-CompilerFromContainer
{
    Param(
        [Parameter(Mandatory=$true)]
        [string]$ContainerName
    )

    $VsixPath = Get-VSCodeExtensionFromContainer -sourcePath (New-TempDirectory) -ContainerName $ContainerName
    if (!(Test-path "$VsixPath\Extract")){
        if (!(Test-Path "$VsixPath.zip")) {
            Rename-Item $VsixPath "$VsixPath.zip"
        }
        New-EmptyDirectory "$VsixPath\Extract"
        Expand-7zipArchive -Path "$VsixPath.zip" -DestinationPath "$VsixPath\Extract"
    }

    "$VsixPath\Extract\extension\bin\alc.exe"
}
Export-ModuleMember -Function Get-CompilerFromContainer