Improved check for $lastExitCode

This commit is contained in:
Markus Fleschutz
2025-02-24 20:42:52 +01:00
parent c6929fc266
commit e36021f3b2
91 changed files with 204 additions and 204 deletions

View File

@ -15,7 +15,7 @@ try {
"Installing Mozilla Thunderbird, please wait..."
& winget install --id Mozilla.Thunderbird --accept-package-agreements --accept-source-agreements
if ($lastExitCode -ne "0") { throw "'winget install' failed" }
if ($lastExitCode -ne 0) { throw "'winget install' failed" }
"Mozilla Thunderbird installed successfully."
exit 0 # success