Skip to content

Commit 2facd2b

Browse files
author
James Brundage
committed
fix: Reimporting module in ExamplesShouldWork.build.ps1
1 parent b2eadca commit 2facd2b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Build/PipeScript.ExamplesShouldWork.build.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ $ModuleName = 'PipeScript'
2727
)
2828

2929
$moduleInfo = Get-Module $ModuleName
30-
$commandsInModule = Get-Command -Module $moduleName
30+
31+
# Reload the module, because commands may have been created since this process first launched.
32+
$psd1Path = $moduleInfo.Path -replace '\.psm1','.psd1'
33+
if (Test-path $psd1Path) {
34+
Import-Module $psd1Path -Global -Force
35+
}
36+
37+
$commandsInModule = Get-Command -Module $moduleName -CommandType All
3138

3239
$commandsWithExamples = $commandsInModule | Where-Object { $_.Examples }
3340

0 commit comments

Comments
 (0)