mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-10 13:27:41 +02:00
Improved check for $lastExitCode
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user