Skip to content

Commit 1b74ddc

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
change $repository to be defined by default
1 parent 188d57d commit 1b74ddc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

build.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ if ($Test) {
353353
$failed = $false
354354

355355
$usingADO = ($null -ne $env:TF_BUILD)
356+
$repository = 'PSGallery'
356357

357358
if ($usingADO) {
358359
$repository = 'CFS'
@@ -361,15 +362,12 @@ if ($Test) {
361362
Register-PSResourceRepository -uri 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2' -Name CFS -Trusted
362363
}
363364
}
364-
else {
365-
$repository = 'PSGallery'
366-
}
367365

368366
if ($IsWindows) {
369367
# PSDesiredStateConfiguration module is needed for Microsoft.Windows/WindowsPowerShell adapter
370368
$FullyQualifiedName = @{ModuleName="PSDesiredStateConfiguration";ModuleVersion="2.0.7"}
371369
if (-not(Get-Module -ListAvailable -FullyQualifiedName $FullyQualifiedName))
372-
{ "Installing module PSDesiredStateConfiguration 2.0.7"
370+
{
373371
Install-PSResource -Name PSDesiredStateConfiguration -Version 2.0.7 -Repository $repository
374372
}
375373
}

0 commit comments

Comments
 (0)