You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Pull Request
## Description
Improve the powershell-yaml check
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the projects associated license.
Copy file name to clipboardExpand all lines: src/ALZ/Private/Tools/Test-Tooling.ps1
+20-6Lines changed: 20 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ function Test-Tooling {
175
175
if ($null-ne$alzModuleCurrentVersion) {
176
176
if ($alzModuleCurrentVersion.Version-lt$alzModuleLatestVersion.Version) {
177
177
$checkResults+=@{
178
-
message="ALZ module is not the latest version. Your version: $($alzModuleCurrentVersion.Version), Latest version: $($alzModuleLatestVersion.Version). Please update to the latest version using 'Update-Module ALZ'."
178
+
message="ALZ module is not the latest version. Your version: $($alzModuleCurrentVersion.Version), Latest version: $($alzModuleLatestVersion.Version). Please update to the latest version using 'Update-PSResource -Name ALZ'."
179
179
result="Failure"
180
180
}
181
181
$hasFailure=$true
@@ -191,18 +191,32 @@ function Test-Tooling {
191
191
# Check if powershell-yaml module is installed (only when YAML files are being used)
Write-Verbose"Failed to install powershell-yaml module"
207
+
}
208
+
if($installSuccessful) {
209
+
$checkResults+=@{
210
+
message="powershell-yaml module was not installed, but has been successfully installed (version $((Get-InstalledPSResource-Name powershell-yaml).Version))."
211
+
result="Success"
212
+
}
213
+
} else {
214
+
$checkResults+=@{
215
+
message="powershell-yaml module is not installed. Please install it using 'Install-PSResource powershell-yaml'."
0 commit comments