Skip to content

Commit 29850c7

Browse files
authored
Bugfix
1 parent 29c6400 commit 29850c7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

pages/Build-Site.ps1

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,11 @@ Try {
7777
}
7878
$aliasCmdlets = Start-ThreadJob -ScriptBlock $scriptBlockNightlyRelease | Receive-Job -Wait
7979

80-
$aliasCmdletsCount = $aliasCmdlets.Length
80+
$aliasCmdletsCount = $aliasCmdlets.Length
8181

82-
$scriptBlockStableRelease = {
83-
Write-Host "Installing latest stable release of PnP PowerShell"
84-
Install-Module PnP.PowerShell -Force
85-
86-
Write-Host "Retrieving PnP PowerShell cmdlets"
87-
$cmdlets = Get-Command -Module PnP.PowerShell | Select-Object -ExpandProperty Name
82+
$scriptBlockStableRelease = {
83+
Write-Host "Retrieving PnP PowerShell cmdlets from latest stable release"
84+
$cmdlets = (Find-Module -Name PnP.PowerShell).AdditionalMetadata.Cmdlets.Split(" ")
8885
$cmdlets
8986
Write-Host "$($cmdlets.Length) cmdlets retrieved"
9087
}

0 commit comments

Comments
 (0)