summaryrefslogtreecommitdiff
path: root/src/mongo/installer/compass
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2018-06-06 11:18:06 -0400
committerMathew Robinson <chasinglogic@gmail.com>2018-06-08 14:23:01 -0400
commite3b54eabd0be75461b521500ee251c152499d5b8 (patch)
treec39931155b94ac41672256976a65e38d29eedfaf /src/mongo/installer/compass
parent1c9354d71c835820f46e5cc557e604b1d602debd (diff)
downloadmongo-e3b54eabd0be75461b521500ee251c152499d5b8.tar.gz
SERVER-34451 Ignore errors downloading and installing compass
Diffstat (limited to 'src/mongo/installer/compass')
-rwxr-xr-xsrc/mongo/installer/compass/Install-Compass.ps1.in20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/mongo/installer/compass/Install-Compass.ps1.in b/src/mongo/installer/compass/Install-Compass.ps1.in
index 001ae9de085..11d79a30696 100755
--- a/src/mongo/installer/compass/Install-Compass.ps1.in
+++ b/src/mongo/installer/compass/Install-Compass.ps1.in
@@ -31,13 +31,19 @@ $CompassExe = "$TemporaryDir" + "compass-install.exe"
Remove-Item $CompassExe -ErrorAction:Ignore
-Write-Output "Downloading Compass from $CompassUrl"
-Invoke-WebRequest -Uri $CompassUrl -OutFile $CompassExe
-
-Write-Output "Installing Compass"
-& $CompassExe
+try {
+ Write-Output "Downloading Compass from $CompassUrl"
+ Invoke-WebRequest -Uri $CompassUrl -OutFile $CompassExe
+
+ Write-Output "Installing Compass"
+ & $CompassExe
+ Write-Output "Successfully installed Compass"
+} catch {
+ # Fail silently. With the way that we've hooked into the MSI
+ # currently we're not able to do any meaningful error reporting
+ # and not crash the installer.
+ Write-Output "Error installing Compass."
+}
# Remove the binary we downloaded
Remove-Item $CompassExe -ErrorAction:Ignore
-
-Write-Output "Successfully installed Compass"