mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 05:43:53 +02:00
Improved check for $lastExitCode
This commit is contained in:
@ -15,7 +15,7 @@ try {
|
||||
"Installing Microsoft Teams, please wait..."
|
||||
|
||||
& winget install --id Microsoft.Teams --accept-package-agreements --accept-source-agreements
|
||||
if ($lastExitCode -ne "0") { throw "'winget install' failed" }
|
||||
if ($lastExitCode -ne 0) { throw "'winget install' failed" }
|
||||
|
||||
"Microsoft Teams installed successfully."
|
||||
exit 0 # success
|
||||
|
Reference in New Issue
Block a user