From 4c96b1138b4f84aa64cf7f2ad7a1cc02f1cdced9 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Wed, 1 Oct 2025 14:53:01 -0700 Subject: [PATCH] Test removing psmodule stuff --- eng/scripts/Set-VcpkgWriteModeCache.ps1 | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/eng/scripts/Set-VcpkgWriteModeCache.ps1 b/eng/scripts/Set-VcpkgWriteModeCache.ps1 index bae52225c..0e46e487c 100644 --- a/eng/scripts/Set-VcpkgWriteModeCache.ps1 +++ b/eng/scripts/Set-VcpkgWriteModeCache.ps1 @@ -5,25 +5,6 @@ param( ."$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 - Install-ModuleIfNotInstalled "Az.Storage" "4.3.0" | Import-Module $ctx = New-AzStorageContext `