mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
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:
parent
8ccde4fa59
commit
cea227fd63
@ -65,8 +65,8 @@ function Set-WinUtilUITheme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Debug "[Set-WinUtilTheme] Unable to apply theme"
|
Write-Host "[Set-WinUtilTheme] Unable to apply theme" -ForegroundColor Red
|
||||||
Write-Debug $psitem.Exception.Message
|
Write-Host "$($psitem.Exception.Message)" -ForegroundColor Red
|
||||||
$inputXML = "" # Make inputXML equal an empty string, indicating something went wrong to the function caller.
|
$inputXML = "" # Make inputXML equal an empty string, indicating something went wrong to the function caller.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) {
|
|||||||
|
|
||||||
$inputXML = Set-WinUtilUITheme -inputXML $inputXML -customThemeName $ctttheme
|
$inputXML = Set-WinUtilUITheme -inputXML $inputXML -customThemeName $ctttheme
|
||||||
if ($inputXML -eq "") {
|
if ($inputXML -eq "") {
|
||||||
Write-Warning "Failed to statically apply theming to xaml content using Set-WinUtilTheme, please check previous Error/Warning messages."
|
Write-Host "Failed to statically apply theming to xaml content using Set-WinUtilTheme, please check previous Error/Warning messages." -ForegroundColor Red
|
||||||
Write-Warning "Quitting winutil..."
|
Write-Host "Quitting winutil..." -ForegroundColor Red
|
||||||
$sync.runspace.Dispose()
|
$sync.runspace.Dispose()
|
||||||
$sync.runspace.Close()
|
$sync.runspace.Close()
|
||||||
[System.GC]::Collect()
|
[System.GC]::Collect()
|
||||||
@ -93,8 +93,8 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (-NOT ($readerOperationSuccessful)) {
|
if (-NOT ($readerOperationSuccessful)) {
|
||||||
Write-Warning "Failed to parse xaml content using Windows.Markup.XamlReader's Load Method."
|
Write-Host "Failed to parse xaml content using Windows.Markup.XamlReader's Load Method." -ForegroundColor Red
|
||||||
Write-Warning "Quitting winutil..."
|
Write-Host "Quitting winutil..." -ForegroundColor Red
|
||||||
$sync.runspace.Dispose()
|
$sync.runspace.Dispose()
|
||||||
$sync.runspace.Close()
|
$sync.runspace.Close()
|
||||||
[System.GC]::Collect()
|
[System.GC]::Collect()
|
||||||
|
Loading…
Reference in New Issue
Block a user