Compare commits

...

3 Commits

Author SHA1 Message Date
Daniel Jurek
c7ae76c610
Double backslash 2025-10-01 15:29:42 -07:00
Daniel Jurek
925236f365
log 2025-10-01 15:13:22 -07:00
Daniel Jurek
4c96b1138b
Test removing psmodule stuff 2025-10-01 14:53:01 -07:00
2 changed files with 3 additions and 20 deletions

View File

@ -8,7 +8,7 @@ function Update-PSModulePathForCI() {
# https://github.com/microsoft/azure-pipelines-tasks/blob/c9771bc064cd60f47587c68e5c871b7cd13f0f28/Tasks/AzurePowerShellV5/Utility.ps1
if ($IsWindows) {
$hostedAgentModulePath = $env:SystemDrive + "\Modules"
$hostedAgentModulePath = $env:SystemDrive + "\\Modules"
$moduleSeperator = ";"
}
else {

View File

@ -3,27 +3,10 @@ param(
[string] $StorageContainerName = 'public-vcpkg-container'
)
Write-Host "Import PSModules-Helpers.ps1"
."$PSScriptRoot/../common/scripts/Helpers/PSModule-Helpers.ps1"
Write-Host "`$env:PSModulePath = $($env:PSModulePath)"
# Work around double backslash
if ($IsWindows) {
$hostedAgentModulePath = $env:SystemDrive + "\\Modules"
$moduleSeperator = ";"
} else {
$hostedAgentModulePath = "/usr/share"
$moduleSeperator = ":"
}
$modulePaths = $env:PSModulePath -split $moduleSeperator
$modulePaths = $modulePaths.Where({ !$_.StartsWith($hostedAgentModulePath) })
$AzModuleCachePath = (Get-ChildItem "$hostedAgentModulePath/az_*" -Attributes Directory) -join $moduleSeperator
if ($AzModuleCachePath -and $env.PSModulePath -notcontains $AzModuleCachePath) {
$modulePaths += $AzModuleCachePath
}
$env:PSModulePath = $modulePaths -join $moduleSeperator
Write-Host "Install/import Az.Storage@4.3.0"
Install-ModuleIfNotInstalled "Az.Storage" "4.3.0" | Import-Module
$ctx = New-AzStorageContext `