diff --git a/eng/common/scripts/Helpers/PSModule-Helpers.ps1 b/eng/common/scripts/Helpers/PSModule-Helpers.ps1 index fae40d650..1a2a0a900 100644 --- a/eng/common/scripts/Helpers/PSModule-Helpers.ps1 +++ b/eng/common/scripts/Helpers/PSModule-Helpers.ps1 @@ -1,7 +1,7 @@ $DefaultPSRepositoryUrl = "https://www.powershellgallery.com/api/v2" $global:CurrentUserModulePath = "" -function Update-PSModulePath() +function Update-PSModulePathForCI() { # Information on PSModulePath taken from docs # https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_psmodulepath @@ -101,4 +101,6 @@ function Install-ModuleIfNotInstalled() return $modules[0] } -Update-PSModulePath +if ($null -ne $env:SYSTEM_TEAMPROJECTID) { + Update-PSModulePathForCI +}