Skip to content

Commit dea5918

Browse files
committed
Fix Write-ToLog missing enumerator
1 parent 2252f26 commit dea5918

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/Winget-AutoUpdate/functions/Write-ToLog.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ function Write-ToLog {
3333
}
3434

3535
#Echo log
36-
if ([String]::IsNullOrEmpty($LogColor)) {
36+
if ($LogColor -notin @("Black", "DarkBlue", "DarkGreen", "DarkCyan", "DarkRed", "DarkMagenta", "DarkYellow", "Gray", "DarkGray", "Blue", "Green", "Cyan", "Red", "Magenta", "Yellow", "White")) {
3737
$LogColor = "White"
3838
}
39-
$Log | Write-host -ForegroundColor $LogColor
39+
$Log | Write-Host -ForegroundColor $LogColor
40+
4041

4142
#Write log to file
4243
$Log | Out-File -FilePath $LogFile -Append

0 commit comments

Comments
 (0)