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

Conversation

9numbernine9
Copy link

Description

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.

Motivation and Context

Fixes: #2266

How Has this Been Tested?

choco install -s . webstorm with these changes; observe that spurious .0 directory is no longer created.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Migrated package (a package has been migrated from another repository)

Checklist:

  • My code follows the code style of this repository.
  • My change requires a change to documentation (this usually means the notes in the description of a package).
  • I have updated the documentation accordingly (this usually means the notes in the description of a package).
  • I have updated the package description and it is less than 4000 characters.
  • All files are up to date with the latest Contributing Guidelines
  • The added/modified package passed install/uninstall in the chocolatey test environment.
  • The changes only affect a single package (not including meta package).

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 chocolatey-community#2266 .
@AppVeyorBot
Copy link

✅ Package verification completed without issues. PR is now pending human review

Comment on lines +9 to 14
# 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
}
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants