Skip to content

Commit 9ef4a9d

Browse files
committed
Forcing installation of platyPS if not found when building documentation
1 parent 5c01978 commit 9ef4a9d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ test_script:
5858
5959
# Upload the project along with test results as a zip archive
6060
on_finish:
61-
- ps: Import-Module .\tools\appveyor.psm1; Invoke-AppveyorFinish
61+
- ps: Import-Module "${env:BuildConfiguration}\tools\appveyor.psm1"; Invoke-AppveyorFinish

build.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ function Build-Documentation
9898
#if ( $null -eq (Get-Module -ListAvailable -FullyQualifiedName $modInfo))
9999
if ( $null -eq (Get-Module -ListAvailable platyPS))
100100
{
101-
throw "Cannot find required minimum version $requiredVersionOfplatyPS of platyPS. Install via 'Install-Module platyPS'"
101+
Write-Verbose -verbose "platyPS not found, installing"
102+
Install-Module -Force -Name platyPS -Scope CurrentUser
103+
# throw "Cannot find required minimum version $requiredVersionOfplatyPS of platyPS. Install via 'Install-Module platyPS'"
102104
}
103105
if (-not (Test-Path $markdownDocsPath))
104106
{

0 commit comments

Comments
 (0)