check for null arguments when calling Install-Program

This commit is contained in:
2020-12-03 17:27:53 -05:00
parent 3378fc93f6
commit ab6cb446de
+4 -1
View File
@@ -179,7 +179,10 @@ Function Install-Program {
)
If ( Test-Path "${Path}" ) {
LogMsg "Running installer: ""${Path}"" ${Arguments}"
Try { Start-Process "${Path}" -ArgumentList "${Arguments}" -Wait }
Try {
If ( $Arguments -eq '' ) { Start-Process "${Path}" -Wait }
Else { Start-Process "${Path}" -ArgumentList "${Arguments}" -Wait }
}
Catch { LogErr $_.Exception.Message }
LogMsg "Installer finished"
If ( $Delete ) {