Skip to content

Commit

Permalink
removed try..catch following recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Nov 7, 2024
1 parent 8e43acc commit 31c5fe3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions chocolatey/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 31c5fe3

Please sign in to comment.