diff --git a/chocolatey/tools/chocolateyInstall.ps1 b/chocolatey/tools/chocolateyInstall.ps1 index fd8ceae097..fca620e632 100644 --- a/chocolatey/tools/chocolateyInstall.ps1 +++ b/chocolatey/tools/chocolateyInstall.ps1 @@ -18,9 +18,5 @@ $packageArgs = @{ Install-ChocolateyPackage @packageArgs -try { - # Remove the installer - Remove-Item $fileLocation -Force -ErrorAction 'SilentlyContinue' -} catch { - Write-Error "Failed to remove the installer: $_" -} +# Remove the installer +Remove-Item $fileLocation -Force -ErrorAction 'SilentlyContinue'