Skip to content

Commit 50d3e86

Browse files
author
Andrew
committed
Stage 4
1 parent e07e5bd commit 50d3e86

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

build.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,13 @@ if (!$Clippy -and !$SkipBuild) {
324324
if ($Test) {
325325
$failed = $false
326326

327-
$FullyQualifiedName = @{ModuleName="PSDesiredStateConfiguration";ModuleVersion="2.0.7"}
328-
if (-not(Get-Module -ListAvailable -FullyQualifiedName $FullyQualifiedName))
329-
{ "Installing module PSDesiredStateConfiguration 2.0.7"
330-
Install-PSResource -Name PSDesiredStateConfiguration -Version 2.0.7 -Repository PSGallery -TrustRepository
327+
if ($IsWindows) {
328+
# PSDesiredStateConfiguration module is needed for Microsoft.Windows/WindowsPowerShell adapter
329+
$FullyQualifiedName = @{ModuleName="PSDesiredStateConfiguration";ModuleVersion="2.0.7"}
330+
if (-not(Get-Module -ListAvailable -FullyQualifiedName $FullyQualifiedName))
331+
{ "Installing module PSDesiredStateConfiguration 2.0.7"
332+
Install-PSResource -Name PSDesiredStateConfiguration -Version 2.0.7 -Repository PSGallery -TrustRepository
333+
}
331334
}
332335

333336
if (-not(Get-Module -ListAvailable -Name Pester))

0 commit comments

Comments
 (0)