Skip to content

Commit 03abc5f

Browse files
committed
Corrected for EventID recognizing
1 parent 88c84b8 commit 03abc5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,19 @@ function Write-ToLog {
140140
$EventID = 1000 # Standard information log
141141

142142
# If it is an installation message
143-
if ($LogMsg -match "Installing") {
143+
if ($LogMsg -match "\bInstalling\b") {
144144
$EventID = 1001
145145
}
146146
# If it is an uninstall message
147-
elseif ($LogMsg -match "Uninstalling") {
147+
elseif ($LogMsg -match "\bUninstalling\b") {
148148
$EventID = 1002
149149
}
150150
# If it is a modification message
151-
elseif ($LogMsg -match "Modifications") {
151+
elseif ($LogMsg -match "\bModifications\b") {
152152
$EventID = 1003
153153
}
154154
# If it is an updating message
155-
elseif ($LogMsg -match "Updating") {
155+
elseif ($LogMsg -match "\bUpdating\b") {
156156
$EventID = 1004
157157
}
158158
# If it is an error

0 commit comments

Comments
 (0)