Change output info from 'Write-Warning' to 'Write-Host' to make sure it's displayed even in RunSpaces as well as PowerShell 5 Environments

This commit is contained in:
Mr.k
2024-08-26 17:11:15 +03:00
parent 8ccde4fa59
commit cea227fd63
2 changed files with 6 additions and 6 deletions

View File

@ -64,8 +64,8 @@ if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) {
$inputXML = Set-WinUtilUITheme -inputXML $inputXML -customThemeName $ctttheme
if ($inputXML -eq "") {
Write-Warning "Failed to statically apply theming to xaml content using Set-WinUtilTheme, please check previous Error/Warning messages."
Write-Warning "Quitting winutil..."
Write-Host "Failed to statically apply theming to xaml content using Set-WinUtilTheme, please check previous Error/Warning messages." -ForegroundColor Red
Write-Host "Quitting winutil..." -ForegroundColor Red
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()
@ -93,8 +93,8 @@ try {
}
if (-NOT ($readerOperationSuccessful)) {
Write-Warning "Failed to parse xaml content using Windows.Markup.XamlReader's Load Method."
Write-Warning "Quitting winutil..."
Write-Host "Failed to parse xaml content using Windows.Markup.XamlReader's Load Method." -ForegroundColor Red
Write-Host "Quitting winutil..." -ForegroundColor Red
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()