Skip to content

Commit

Permalink
ConsoleColor Enum Bugfix for fallback colors
Browse files Browse the repository at this point in the history
  • Loading branch information
echalone committed Aug 19, 2020
1 parent 5897380 commit fea2b48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions PowerShell/Modules/TUN.Logging/TUN.Logging.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'TUN.Logging.psm1'

# Version number of this module.
ModuleVersion = '1.1.0'
ModuleVersion = '1.1.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -122,7 +122,8 @@ V 1.0.2: Moved markdown link from HelpInfoUri to description
V 1.0.3: Fixed icon link
V 1.0.4: Bumped required module version
V 1.0.5: Bugfixes for logging from console or function, added logging of user
V 1.1.0: Bugfixes for Linux, now compatible with Linux Powershell Core'
V 1.1.0: Bugfixes for Linux, now compatible with Linux Powershell Core
V 1.1.1: Bugfixing fallback color'

# Prerelease string of this module
# Prerelease = ''
Expand Down
4 changes: 2 additions & 2 deletions PowerShell/Modules/TUN.Logging/TUN.Logging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function Get-ConsoleForegroundColor {

try {
$Color = $Host.UI.RawUI.ForegroundColor
if([System.Enum]::IsDefined([System.Console] , $Color)) {
if([System.Enum]::IsDefined([System.ConsoleColor] , $Color)) {
[ConsoleColor] $RetVal = [ConsoleColor]$Color

return [ConsoleColor] $RetVal
Expand All @@ -346,7 +346,7 @@ function Get-ConsoleBackgroundColor {

try {
$Color = $Host.UI.RawUI.BackgroundColor
if([System.Enum]::IsDefined([System.Console] , $Color)) {
if([System.Enum]::IsDefined([System.ConsoleColor] , $Color)) {
[ConsoleColor] $RetVal = [ConsoleColor]$Color

return [ConsoleColor] $RetVal
Expand Down

0 comments on commit fea2b48

Please sign in to comment.