From 15a252691b68751487568169daa049944f70689a Mon Sep 17 00:00:00 2001 From: "Matt M." Date: Thu, 7 Dec 2023 09:50:33 -0500 Subject: [PATCH] (webstorm) Strip `.0` suffix from installation directory When determining the installation directory for Webstorm, remove any `.0` suffix that might be present in the version number. Jetbrains doesn't use this part of the release version number when installing, so this causes Chocolatey to create an empty directory that never gets used or cleaned up. Fixes issue #2266 . --- automatic/webstorm/tools/ChocolateyInstall.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/automatic/webstorm/tools/ChocolateyInstall.ps1 b/automatic/webstorm/tools/ChocolateyInstall.ps1 index d39a10f753f..d29729e2a32 100644 --- a/automatic/webstorm/tools/ChocolateyInstall.ps1 +++ b/automatic/webstorm/tools/ChocolateyInstall.ps1 @@ -6,7 +6,9 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $programFiles = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0] $pp = Get-PackageParameters -$installDir = "$programFiles\JetBrains\WebStorm $env:ChocolateyPackageVersion" +# If the release version ends in '.0', remove this since JetBrains don't +# use this part of the version number when creating the installation directory. +$installDir = "$programFiles\JetBrains\WebStorm $($env:ChocolateyPackageVersion -replace '.0$', '')" if ($pp.InstallDir) { $installDir = $pp.InstallDir }