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 d5c47a6 commit c06e930
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 c06e930

Please sign in to comment.