Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(webstorm) Strip .0 suffix from installation directory #2367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion automatic/webstorm/tools/ChocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Comment on lines +9 to 14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as over on the datagrip PR:

We're creating the directory further down on line 19. Can we not just remove that line and let the installer install wherever it thinks it should? Why do we need to create the directory?

Expand Down