Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/ALZ/Private/Tools/Test-Tooling.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,19 @@ function Test-Tooling {
}

if ($yamlModule) {
$checkResults += @{
message = "powershell-yaml module is installed (version $($yamlModule.Version))."
result = "Success"
# Import powershell-yaml module if not already loaded
if (-not (Get-Module -Name powershell-yaml)) {
Write-Verbose "Importing powershell-yaml module version $($yamlModule.Version)"
Import-Module -Name powershell-yaml -RequiredVersion $yamlModule.Version -Global
$checkResults += @{
message = "powershell-yaml module is installed but was not imported, now imported (version $($yamlModule.Version))."
result = "Success"
}
} else {
$checkResults += @{
message = "powershell-yaml module is installed and imported (version $($yamlModule.Version))."
result = "Success"
}
}
} elseif ($skipYamlModuleInstall.IsPresent) {
Write-Verbose "powershell-yaml module is not installed, skipping installation attempt"
Expand Down
Loading